LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I replace JSON variables in a JSON file with native JSON VIs.

Solved!
Go to solution

I am now doing it by opening the JSON file using the file IO VIs, reading the full file to a string and then using string manipulations like match regular expression an search and replace string.

I then replace the whole file with the manipulated string. 

This is now working, but I thought it is long winded way.  I went for this way of doing it because I am not familiar with Native JKI JSON VIs.

Can some kind soul over there show me how it is done with native JSON VIs.

Attached is the program that shows how I am doing it.

0 Kudos
Message 1 of 3
(87 Views)
Solution
Accepted by topic author Blocka04

Note: there are multiple JSON tools available.  The native ones that come with LabVIEW are different that the JKI library you are using.  Personally, I use and recommend JSONtext, a library I wrote.  Definitely use a real JSON library, not string parsing, as there are all sorts of potential bugs you could run into.

Message 2 of 3
(64 Views)

Thanks very much for your help, I have tried you application and it does what is says in the tin.

0 Kudos
Message 3 of 3
(47 Views)