Activity Forums Salesforce® Discussions "currency" in json Response but while deserializing Reserved Word Exception is shown in Salesforce?

  • Saurabh

    Member
    April 27, 2017 at 2:37 pm

    Hi Suraj

    Perform a string replace on the json string, the implications of this is unintended replacement of valid text inside a string, but this could be mitigated if the form of the json is as you've supplied "currency": "ABC" you could string replace:

    jsonString.replace('"currency":', '"currency_x":');

    Hope it may help you:

  • Avnish Yadav

    Member
    September 30, 2018 at 4:21 am

    Hello,

    You have two choices: JSON.deserializeUntyped or JSON.createParser. But if still find error, Please share the code.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos