SGI 0 Posted June 14, 2018 Report Share Posted June 14, 2018 Hi, I have a problem using JKI JSON, it does not convert JSON data correctly back to the datatype. I noticed this problem with all array types when the array is part of a cluster. Example snippet included. I have traced the problem, and I think the data gets lost at "\Deserializer\JSON Parser\Parse Value.vi", at the in 'Array of VData to VCluster__ogtk.vi' in state 'begin-object' (note that that example data is with different datatype than the first example) I'm using JKI-JSON-Serialization-master from Github, downloaded today (2018-06-14) Kind regards & thank you in advance for your time looking into this, SGI Quote Link to post Share on other sites
SGI 0 Posted June 15, 2018 Author Report Share Posted June 15, 2018 (edited) This is a bug, and has to do with the name of the array: Look at the created JSON string, and you will see that the name is not "Errors[]" (the original name of the variable) but "Errors" (without the "[]" that got removed somehow). The JSON parser looks for "Errors[]" but cannot find the correct variable name (and will ignore the data called "Error" ) Remove the [] from the array name and it will work. Edited June 15, 2018 by SGI Quote Link to post Share on other sites
Jim Kring 138 Posted June 22, 2018 Report Share Posted June 22, 2018 Hi There. Yes, it looks like you may have found a bug. I think that "[]" characters are allowed in JSON data names. Perhaps they were removed because they are also special characters. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.