Activity Forums Salesforce® Discussions System.JSONException: no content to map to Object due to end of input

  • System.JSONException: no content to map to Object due to end of input

    Posted by Kirandeep on September 22, 2020 at 2:48 pm

    How to fix System.JSONException: no content to map to Object due to end of input in Test Class in Salesforce?

    Deepak replied 3 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Deepak

    Member
    September 22, 2020 at 3:48 pm

    Try this :
    String jsonInput = '{"email":"[email protected]","LastName":"ABCD","FirstName":"ACFPY","Suffix":"","Title":"Engineer","Psw":"","PhoneCode":"","Phone":"100-000-000"}';
    test.startTest();
    ClassName.MethodName(jsonInput);
    test.stopTest();

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos