LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extended Ascii on JSON

Solved!
Go to solution

Hi,

 

I have a JSON setting file witch is loaded from my .VI

My JSON is like this:

Nalofox_1-1676158660310.png

I need to write the charactère 0x00 which is \u0000 but when I do that labview can't interpret it:

It replaces all the data by "?".

Nalofox_2-1676158750296.png

Here is my the labview structure I use:

Nalofox_3-1676158874448.png

 

Do you have a fix?

Thanks for taking a look at my situation.

 

0 Kudos
Message 1 of 3
(871 Views)
Solution
Accepted by topic author Nalofox

The standard JSON functions that come with LabVIEW have a known bug of truncating strings at the first zero, even if that zero is properly represented as \u0000.  You will need to use a different JSON library, such as JSONtext (which I wrote).

 

BTW, you shouldn't need to do all that utf8 conversion; the JSON functions should handle that.

0 Kudos
Message 2 of 3
(829 Views)

Thanks for your response.

 

So I have used the lib you tell me JSONtext and it works well,

Here's is my labview (there may be a better way to do this).

Nalofox_1-1676222145217.png

 

Have a good day

0 Kudos
Message 3 of 3
(795 Views)