Incorrect parsing of JSON string back into 'cluster of variant'
Issue #22
resolved
I have a problem converting a json string back to the 'cluster of variant' of which I created it. Example code included (first example fails, 2nd and 3rd example work as expected)
Did I misread some instructions / am I using JSONtext wrong, or is this a bug?
Kind regards & thank you in advance for your time and effort.
Comments (3)
-
repo owner -
repo owner In generally, though, I suggest you reconsider using Variants. Why are you using Variants rather than JSON as your flexible type?
-
repo owner - changed status to resolved
Resolving as no action required.
- Log in to comment
It's the data value inside the Variant that sets the name. Also, if you want to use a Variant to get values back, you still need to set the datatype and name inside the Variant (since JSON doesn't have all of LabVIEW's datatypes).
Try this:![Image.png](https://bitbucket.org/repo/ajM8Xx/images/2020511090-Image.png)