LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Parse JSON value, nested object or array as string

Status: Already Implemented

Available in LabVIEW 2019 and later. Go to the Functions > Programming > String > Flatten/Unflatten String palette and select the item to download and install the JSONtext Toolkit for LabVIEW.

Using LabVIEW primitive Unflatten From JSON, we need to know the precise structure of the JSON input to access a specific value.

However sometimes we don't have the precise sturcture of the JSON input beforehand, sometimes the structure is heavily nested.

It will be very useful to parse JSON value, nested object or array as string, so that we can observe it or leave further parsing to a latter stage.

e.g. {"a":{"b":[{"c":"c"},{"d":FALSE},{"e":[1,2,3]}]}}

the structrue of value of "a" is a little complicated and I'd like it to be parsed into a string first. It would be very convinient if we can have cascaded parsings as shown below.

 

capture.PNG

 

6 Comments
Proven Zealot

Please check out LabVIEW 2019, which includes the JSON Toolkit. If you need the toolkit in an earlier version of LabVIEW, you can install it from here:

https://forums.ni.com/t5/JSON-Toolkit-for-LabVIEW/gp-p/8520

 

Proven Zealot
Status changed to: Already Implemented

Available in LabVIEW 2019 and later. Go to the Functions > Programming > String > Flatten/Unflatten String palette and select the item to download and install the JSONtext Toolkit for LabVIEW.

DNatt, NI
Member

Thanks Darren for point out the implementation, though here comes another problem.

After upgraded to 2019, the JSONtext adds-on indicator showed up. But while installing the adds-on by VI Package Manager, I got this message and the process stopped.

I'm using LabVIEW 2019 (32-bit) on Windows 10 Home Edition.

 

capture.PNG

Active Participant

Can you try opening VIPM as "run as administrator" and then install JSONtext from there? 

Member

Tried running as administrator, failure again. I even tried to installed earily versions of JSONtext, same result.

I'm using LabVIEW 2019 (32-bit) on Windows 10 Home Edition (64-bit based on x64 processors).

 

capture.PNG

Proven Zealot