Jump to content
beuleal

TCP Write JSON

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.