ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating and adding to JSON file

Solved!
Go to solution

Hello,

 

This may be a simple problem and I'm just not understanding some of the previous forum posts, but I'm trying to:

  1. Create a JSON file
  2. Add objects to that file

Following the solution in this post  Solved: Using LabVIEW to compose JSON strings incrementally - NI Community I was able to build a JSON string. I was then trying to add to one of the JSON arrays by following the solution in this post Solved: Add object into JSON file - NI Community.

 

My code looks like this:

Phteven_722_0-1630346355310.png

 

and I'm getting this output:

Phteven_722_1-1630346432375.png

 

I want the JSON to read as follows:

Phteven_722_2-1630346771459.png

 

When I try to run the code I get the following error:

Phteven_722_3-1630346950316.png

 

Is there an obvious error to the path or the variable types that I am overlooking? Do I need to change input to the JSON string that I'm trying to add to a variant?

 

Thanks for the help.

0 Kudos
Message 1 of 2
(3,803 Views)
Solution
Accepted by topic author Phteven_722
0 Kudos
Message 2 of 2
(3,759 Views)