Benchtop Measurement and Test
Distributed Measurement and Control
Systems Engineering Software
Perspectives showcases how NI sees what’s next in the world of test and technology.
You can request repair, RMA, schedule calibration, or get technical support. A valid service agreement may be required.
Provides support for NI data acquisition and signal conditioning devices.
Provides support for Ethernet, GPIB, serial, USB, and other types of instruments.
Provides support for NI GPIB controllers and NI embedded controllers with GPIB ports.
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?
Go to Solution.
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.
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.
What do you need our team of experts to assist you with?
We'll be in touch soon!