You need to sign in to do that
Don't have an account?
code developer
How to get object from JSON parser ?
Is there any way to get object from json response other than deserialize untyped(As it supports only for primitive data types)?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Is there any way to get object from json response other than deserialize untyped(As it supports only for primitive data types)?
I have a scenario where I get dynamic json response(i.e. json response varies every time).
So, I am deserialising using Streaming Json parser,but the json response I get contains nested json objects in that case If I iterate, I may get toomany scripts exception, so is there any other alternative?
To parse the dynamic response, I need to consider all the scenarios like :
1. nested objects,
2.arrays
3. normal key value pairs.
Could you please suggest how to approach this?
{
"response":[
{
"field1":"Developer",
"field2":{
"type":"Entery Level"
},
"field3":{
"dynamicdata":{
"Objectfield":{
"Objectfield":"abc"
}
}
}
},
{
"field1":"Developer",
"field2":{
"certification":"501 certified"
},
"field3":{
"language":"Apex"
}
},
{
"field1":"Developer",
"field2":{
"hasBlog":"true"
},
"field3":{
"Grade":{
"A":{
"marks":10
}
}
}
},
{
"field1":"Developer",
"field2":{
"isContributor":"true"
},
"field3":{
"Rank":{
"A":{
"marks":10
}
}
}
}
],
"response1":{
"field1":"Developer",
"field2":{
"hasBlog":"true"
},
}
}
Could please suggest using the example response above?
field3 highlighted above contains dynamic response.