01-24-2014 03:58 PM
I am trying to use the "Unflatten from JSON" function (fwiw, I have also been working with the i3 LV JSON library too, and have the same problem.).
I am interfacing an API where the JSON for a particular text field is coming back as 'null' (no quotes).
So when there is valid text, it parses fine (the text is in quotes). When the field is null, the parser throws an exception.
I have tried replacing :null in the JSON with :"" however, this particular API also reports back nulls for numerics; so I can't do that without shooting myself in the foot.
1) Is null valid JSON data?
2) If so, can we get the parser to handle it, and return default data type data + issue a warning?
Solved! Go to Solution.
01-24-2014 04:04 PM
Quick reply, I looked on the web and using null in this way appears to be OK within the JSON spec.
I suggest that null as a numeric be updated as NaN, and that null as a string be updated as either an empty string or "#NULL#" or something that can be handled.
01-24-2014 04:24 PM
And, of course, as soon as I post and make a stink, I notice the "Default NULL elements" option, that handles exactly the problem I have been having.
Sorry to bother you all.