New answers tagged

0

This may be 6 years too late... but might help someone else... I was creating a web service for a specific JSON being sent to me (so I do not have the option of changing the names of the values sent to me). I was able to utilize a class using Map<String,String> to get a generic map of the incoming request. Specifically, my example: { "message&...


3

The Tooling API uses a different base URI to the standard REST API: Docs The base URI for each Tooling API REST resource is http://domain/services/data/vXX.X/tooling/ where domain is a My Domain or a custom domain and vXX.X is the API version number. For example: https://MyDomainName.my.salesforce.com/services/data/v35.0/tooling/ So, as kurunve commented, ...


3

Because of the limits of how JSON works in Apex, you're limited to either JSON.deserializeUntyped or JSONParser. With the former, you'll have to inspect the items property to determine if it is an array or not, and take the appropriate steps. Map<String, Object> parsedJson = (Map<String, Object>)JSON.deserializeUntyped(jsonBody); Object ...


Top 50 recent answers are included