Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
Hello All,

I'm converting the Json string into map<string,string>, getting the error System.JSONException: Illegal value for primitive: Class.System.JSON.deserialize.

Snippet for response:

 

{"attributes":{"type":"AggregateResult"},"ParentId":"0012v000030DpaDAAS","expr0":701.0}

Apex code:

 

map<string, string> accounts = (map<string, string>) JSON.deserialize(js, map<string, string>.class);

Please share your thoughts...

Regards,

VSK98​​​​​​​
1 answer
0/9000