12-18-2024 10:08 AM
Hello
I need to create a json in the following structure:
I've searched several forums, but none I've seen have as many layers as I need.
Could someone help me?
Solved! Go to Solution.
12-18-2024 10:18 AM - edited 12-18-2024 10:31 AM
Hello
I need to create a json in the following structure:
I tried to put the json here, but it blocked my post
I've searched several forums, but none I've seen have as many layers as I need.
Could someone help me?
12-18-2024 10:33 AM
Hello
I need to create a json in the following structure:
I tried to put the json here, but it blocked my post
I've searched several forums, but none I've seen have as many layers as I need.
Could someone help me?
12-18-2024 12:34 PM
1. Install the JSONtext library. This is an amazing tool for creating and reading JSON files in LabVIEW.
2. Build up a cluster with the structure you want and then use the To JSON Text VI to create the text. You can then save that text string to a file.
12-18-2024 07:59 PM
Duplicated with Build json with this structure
12-18-2024 08:24 PM
JSON Text is a toolkit I use for JSON work in LabVIEW
https://www.vipm.io/package/jdp_science_jsontext/
You start with modeling a cluster equivalent of JSON; then you can convert between cluster and JSON.
12-19-2024 09:23 AM - edited 12-19-2024 09:25 AM
Guys, do you know how remove the duplicates of my JSON?
I have 2 equipments and my code create 6 items on JSON
Please, help me
{
"EQ1":{
"TCP":{
"1":{
"test_t_inst":{
"Type":"ABC",
"IP":"192.168.0.0",
"Port":111,
"Still":1,
"Register":"Register",
"Address":12345,
"SizeLength":1,
"FET":2,
"Size":"big",
"Conversion":"small"
}
}
}
},
"EQ1":{
"TCP":{
"2":{
"test_1_avg":{
"Type":"ABC",
"IP":"192.168.0.0",
"Port":111,
"Still":2,
"Register":"Register",
"Address":36871,
"SizeLength":1,
"FET":0,
"Size":"big",
"Conversion":"small"
}
}
}
},
"EQ1":{
"TCP":{
"3":{
"test_2_avg":{
"Type":"ABC",
"IP":"192.168.0.0",
"Port":111,
"Still":1,
"Register":"Register",
"Address":24572,
"SizeLength":1,
"FET":0,
"Size":"big",
"Conversion":"small"
}
}
}
},
"EQ2":{
"TCP":{
"1":{
"test_t_inst":{
"Type":"ABC",
"IP":"192.168.0.0",
"Port":111,
"Still":2,
"Register":"Register",
"Address":32451,
"SizeLength":1,
"FET":0,
"Size":"big",
"Conversion":"small"
}
}
}
},
"EQ2":{
"TCP":{
"2":{
"test_1_avg":{
"Type":"ABC",
"IP":"192.168.0.0",
"Port":111,
"Still":1,
"Register":"Register",
"Address":27789,
"SizeLength":1,
"FET":1,
"Size":"big",
"Conversion":"small"
}
}
}
},
"EQ2":{
"TCP":{
"3":{
"test_2_avg":{
"Type":"ABC",
"IP":"192.168.0.0",
"Port":111,
"Still":2,
"Register":"Register",
"Address":11234,
"SizeLength":1,
"FET":1,
"Size":"big",
"Conversion":"small"
}
}
}
},
"user":"johnCena",
"token":"327AD8E61A4F6EB329CE5190E",
"password":"TheLastOfUS"
}
12-19-2024 09:50 AM
Your 2D array constant on the BD has 6 rows.
I think you need to connect 'Array In' to the code instead of the constant.
12-19-2024 09:57 AM
Yeap, but the constant it's only for test
The data entry it's coming on this format
12-19-2024 10:07 AM - edited 12-19-2024 10:16 AM
Sorry, I don't see your problem.
The constant has 6 rows resulting in 6 EQ entries in the JSON string.
If I cut the constant to 2 rows the resulting JSON string has 2 EQ entries.