Jump to content

Recommended Posts

51 minutes ago, RogerSaele said:

There is no support for fixed-point numbers.

there is hardly support in labview itself ;)

In reality this is a pretty easy fix to do on your own branch of the code. Inside here:

https://bitbucket.org/drjdpowell/jsontext/src/default/Variant to JSON Text.vi

and here: https://bitbucket.org/drjdpowell/jsontext/src/default/JSON text to Variant.vi

If you look for every case structure using the type enum, find the case for "extended precision" and then add "Fixed Point" to the same case. Numeric variants automatically coerce so it should work as simple as that. (I suggest extended because of the different variations of fixed point, potentially using 64 bits in a more efficient manner than say a 64 bit double. You will still possibly lose precision)

Edited by smithd

Share this post


Link to post
Share on other sites
1 hour ago, smithd said:

there is hardly support in labview itself ;)

In reality this is a pretty easy fix to do on your own branch of the code. Inside here:

https://bitbucket.org/drjdpowell/jsontext/src/default/Variant to JSON Text.vi

and here: https://bitbucket.org/drjdpowell/jsontext/src/default/JSON text to Variant.vi

If you look for every case structure using the type enum, find the case for "extended precision" and then add "Fixed Point" to the same case. Numeric variants automatically coerce so it should work as simple as that. (I suggest extended because of the different variations of fixed point, potentially using 64 bits in a more efficient manner than say a 64 bit double. You will still possibly lose precision)

I already fixed it, but I presumed this should be fixed in the master branch as well.

Share this post


Link to post
Share on other sites
Quote

JSONtext VIs

The Flatten/Unflatten String palette includes a link to install JSONtext VIs for programmingJSON in LabVIEW. On the Flatten/Unflatten String palette, click Install JSONtext Add-on toinstall the JSONtext add-on from the JKI VI Package Manager (VIPM). The JSONtext VIsappear on the Addons»JSONtext palette.

[Special thanks to Dr. James David Powell, author of the JSONtext add-on.]

https://www.ni.com/pdf/manuals/371780r.pdf

yay! 🎉

too bad nxg breaks the code

Edited by smithd
  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, smithd said:

The JSONtext VIs appear on the Addons»JSONtext palette.

As of the latest Tools Network version, the palettes should also appear in the "Flatten/Unflatten String>>JSONtext" palette, in place of the install link in LabVIEW 2019.  It's programmatically added, so let me know if that doesn't work for you.

  • Like 1

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.