beuleal Posted October 14, 2015 Report Share Posted October 14, 2015 Hi guys! I using i3 json pallet to transform a big cluster into json. The cluster has a lot of information and one of them is an array with 600 position. The cluster's size is approx. 6kb, which isnt too much. When im transfering, it takes approx. 1 sec to transfer. What should i do? Quote Link to comment
hooovahh Posted October 14, 2015 Report Share Posted October 14, 2015 You should post your code and give more details about your setup. If you are opening and closing the transfer every time this is probably expected. Keeping the reference open the whole time will probably improve total transfer time. It was probably an accident, but you should also not make two topics. 1 Quote Link to comment
smithd Posted October 15, 2015 Report Share Posted October 15, 2015 Hi guys! I using i3 json pallet to transform a big cluster into json. The cluster has a lot of information and one of them is an array with 600 position. The cluster's size is approx. 6kb, which isnt too much. When im transfering, it takes approx. 1 sec to transfer. What should i do? Depends on what exactly is taking 1 second. If its the conversion from cluster to json string, well that library, if I remember correctly, is on the slow side. I'd recommend this one: https://lavag.org/files/file/216-json-labview/ or of course the built-in flatten to json which is even faster. 1 Quote Link to comment
Popular Post Mellroth Posted October 15, 2015 Popular Post Report Share Posted October 15, 2015 ...or of course the built-in flatten to json which is even faster. Just a bit of warning regarding the built-in json methods. If you flatten a cluster containing a string with \00 characters in it, it all converts nicely to json, but the built in functions fails to convert the strings back to the original value. The reason is probably that the json parser stops decoding the UTF8 encoded string at \00 (IMHO this is clearly a bug since strings are not NULL terminated in LabVIEW). /J 4 Quote Link to comment
Rolf Kalbermatter Posted October 16, 2015 Report Share Posted October 16, 2015 The reason is probably that the json parser stops decoding the UTF8 encoded string at \00 (IMHO this is clearly a bug since strings are not NULL terminated in LabVIEW). /J It's clearly a bug. The encoding even goes well and the actual JSON decoding too, but then somewhere between there and the conversion into a proper LabVIEW string handle things go awry by using a standard C string function instead of allowing for embedded \0 characters. Quote Link to comment
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.