You need to sign in to do that
Don't have an account?
Justin Kitagawa 6
I had been trying to parse using a custom class (JSON 2 APEX), but it breaks when there are both found in a single return... any ideas?
Parsing unpredictable JSON
I am trying to parse JSON that has an element that can come over as either a string or list...
"people": [ { "jobFunction": "Marketing", "jobLevel": "C-Level", "industry": "Software" },{ "jobFunction": ["Marketing","Sales"], "jobLevel": "C-Level", "industry": "Software" }]I can't figure out how to parse JSON that contains both such as above.
I had been trying to parse using a custom class (JSON 2 APEX), but it breaks when there are both found in a single return... any ideas?
Please mark my answer as best, if it works
Try this
http://json2apex.herokuapp.com/
Thanks
Amit Chaudhary
Use the following method to convert node to array when you get only one element in some cases.
Hope that helps!