anand.t
(Anand T)
1
Hi
I am facing problem in Dynamic JSON handling. I am using Deserialize JSON and output is in JSON object. Now I am calling
item(“height”).ToString
But when height is missing in JSON it thrown error
Object reference not set to an instance of an object.
Please find attach JSON.
Regards
AN
ptrobot
2
Have you tested with ContainsKey()?
height = If (item.ContainsKey("height"), item("height").ToString, "Unknown")
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.