SGI 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 Link to comment Share on other sites More sharing options...
SGI Posted June 15, 2018 Author Report Share Posted June 15, 2018 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. Link to comment Share on other sites More sharing options...
Jim Kring 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.