Jump to content

Recommended Posts

  • 3 months later...
Posted

Hello,

I used JSONtext library in my old project and now I tried to brush this project and install this library through VIPM to Labview 2023 again ... There appeared an error concerning dependencies "VIPM couldn't download the package JDP Science Common Utilities v1.4.1.18 from the remote server ... Could you please check availability of this package?

Thanks

Jiri

 

Posted

The Reformat.vi function has a boolean input "Format empty string as null".

This input seems to be fully ignored as it happily continues to output "some_param":"" (empty string) instead of "some_param":null

 

 

Posted

In the context of this VI, "empty string" refers to the JSON terminal. If you don't provide any input, it will return null. Otherwise, it returns an error.

image.png.08c97074bb8762bdbf8f1dc3c73f09be.png

Posted

I will change the terminal name to "Format empty input as null" to prevent reading it as referring to JSON Strings in the input rather than the entire LabVIEW string.   And I'l try and give a better description:

2025-01-1509_16_13-ContextHelp.png.91abdb4948206d5b62f56cca0105e93c.png

  • Like 1
  • 4 months later...
Posted

When passing a "no error" error cluster to the "To JSON Text.vim" VI of the JSONtext toolkit, the output string is empty.

This is not the expected behavior.

I would expect:

  status = false
  code = 0
  source =

Tested with v1.9.1.125 in LV 2021 SP1 on Windows

Posted

This works as expected in version 1.7.0.118

Tested with LV2019 SP1 (32-bit)

{"status":false,"code":0,"source":""}

image.png.1108dfd06a7f9445d022e0b1a1c7bd45.png

Posted

My apologies, I must have had a brain fart when I looked into that (I suspect isolating the vim from the VI I was using it and not connecting a "no error" constant to the input)?

Things work as they should upon checking again.

  • 2 weeks later...
Posted (edited)

Hi, I am using jsontext library in a project which I have been asked to localize to Chinese but get "??" out when using from jsontext.

Is there a way to do this that I am missing, or am I doing something fundamentally wrong. 

The dev PC in windows has all the localization / regions set to Chinese.
 

image.png.a62a42e0c10eca2ced4ad44f57982d00.png

Thank you

Edited by barryc4
Posted

JSON is always in UTF-8, and JSONtext will try and convert to your computer's character set automatically, so I don't think you need any of that stuff that has "UTF8".  Try simply using the single function to convert to a 2D array of strings.

However, by sure you are actually passing true JSON, with UTF8 encoding, not whatever your computer is using.  

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.