07-01-2024 04:28 PM
James,
I didn't find out "Generate JSON Schema from LV Datatype" at JSONtext library as below. Can you please share where we are able to download it?
07-01-2024 04:42 PM
I think there is no generate Schema from Labview date type functionality yet in JSONtext.
I'm currently working on one and will try release a package soon.
08-08-2024 02:16 PM
@JoGra wrote:
I think there is no generate Schema from Labview date type functionality yet in JSONtext.
I'm currently working on one and will try release a package soon.
I've needed this too and have made some progress. Would be happy to share/collaborate.
08-08-2024 03:05 PM
I've created a working repo here: https://github.com/JKISoftware/generate-json-schema-labview
Note that the code is quite simple (not much more complicated than what you're looking at below)
08-08-2024 11:58 PM
Hi Jim,
Is the repo public?
I can't find it on GitHub..
Cheers
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
08-14-2024 07:35 AM - edited 08-14-2024 07:36 AM
Hi Jim,
I have made some more progress and could make the repo now public: novatron-fusion/LabVIEW-JSON-Schema-Generator (github.com)
Please have a look! I would be glad for any feedback.
12-09-2024 02:51 AM
I've also now added a simple Schema Generator to the package:
02-12-2026 06:49 AM - edited 02-16-2026 10:30 AM
Hi guys,
I am not very savvy with JSON formats, and I would like to use the 'Validate Against JSON Schema.vi' to show user where a mistake is:
How would I infer the JSON Schema from an already existing JSON file?
I am confused as to how to format the JSON Schema input of the above VI.
Would anyone be able to help me out, please?
Below is an example JSON file content:
{
"Recipe":{
"UART_Ports":[
{
"Device_Name":"UART1",
"Comm_Name":"UART1",
"Serial Settings":{
"timeout(ms)":1000,
"baud rate":19200,
"data bits":8,
"parity":0,
"stop bits(10;15;20)":10,
"flow control":0
}
},
{
"Device_Name":"UART2",
"Comm_Name":"UART2",
"Serial Settings":{
"timeout(ms)":1000,
"baud rate":19200,
"data bits":8,
"parity":0,
"stop bits(10;15;20)":10,
"flow control":0
}
}
],
"DAQ_config":{
"Digital_Inputs":[
{
"Alias":"Bon_Down",
"Channel_Address":"cDAQ1Mod1_NI9375/port0/line11"
},
{
"Alias":"Air_Pressure_OK",
"Channel_Address":"cDAQ1Mod1_NI9375/port0/line14"
}
],
"Digital_Outputs":[
{
"Alias":"Close_Canopy",
"Channel_Address":"cDAQ1Mod1_NI9375/port1/line0"
},
{
"Alias":"BON_Up",
"Channel_Address":"cDAQ1Mod1_NI9375/port1/line3"
}
],
"Analog_Inputs":[
],
"Analog_Outputs":[
]
},
"Test steps":[
{
"retests":0,
"continue on failure":false,
"Log results":true,
"Test_name":"step1",
"Enable":true
},
{
"retests":0,
"continue on failure":false,
"Log results":true,
"Test_name":"step2",
"Enable":true
}
],
"UUT_Spec_Limits":[
],
"General Info":{
"Model Name":"modelName",
"Event Logger":false
},
"DataBase_Config":{
"Enable DB":true,
"Results Table Name":"tbl_name"
},
"Execution_Config":{
"Stop On First Fail":true,
"Nr of Repeat":0,
"Repeat Sequence":false,
"Sleep before repeat":0
},
"Process_Conditions":{
"Start_Conditions":[
{
"Channel Alias":"Air_Pressure_OK",
"Expected State":true
},
{
"Channel Alias":"E_Stop_OK",
"Expected State":true
}
],
"Test_Running_Conditions":[
],
"Stop_Conditions":[
],
"Abort_Conditions":[
{
"Channel Alias":"STOP_Signal",
"Expected State":false
}
]
}
},
"Project_Specific":{
"Product Config":{
"Product SKU":"",
"...Technician Entry...":""
},
"Station Config":{
"Station Option (eg. DB)":"",
"Station Option (eg. ID)":"",
"...Engineer Entry...":"",
"BarcodeLength":23,
"BarcodeDashNumberPresent":false,
"UserIdMajorMinorBuild":"0.0.14"
},
"Move_To_TFW_PC":{
"TCP/IP Present":false,
"Use_Limits_Database":true
},
"CW Mask Limits":[
[
0,
-78
],
[
460,
-78
]
],
"CM Mask Limits":[
[
0,
-77
],
[
460,
-77
]
]
}
}
Thanks
02-15-2026 02:55 AM
There is a generate schema function in the library that should make a basic schema from your JSON.
02-16-2026 10:22 AM
Thanks, wasn't aware of that function, I'll give it a go.