JSON Output

This node is used for autoparametrization of JSON (JavaScript Object Notation) files (*.json).

After selecting a file, the output node provides all supported inputs as table or tree containing names and values. Each row can be added as a respnse or output slot using drag and drop.

Expected File Content

The input file can contain standard JSON notation. Nested structures can also be used, this integration scans the first 20 levels of the JSON structure. Currently supported types are shown in the following example:

{
	    "some_file_paths": {
		"path_file_1": "D:\\Projects\\mapping.txt",
		"path_mesh_file": "D:/Projects/mesh.cdb"
	    },
	    "example_float": 300.0,
	    "example_int": 5,
	    "example_vector_of_floats": [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1],
	    "example_vector_of_ints": [1,5,9,10,20],
	    "example_vector_of_strings": ["first_entry","second_entry","third_entry"],
	    "example_string": "this_is_an_example",
	    "dictionary": {
		"another_float": 1.65,
		"another_string": "mode_select_1",
		"another_dictionary": {
			"param_1": 1.0,
			"param_2": 2,
			"vector_3": [1,2,3]
		}
	    }
	}
	
Extracted Information

For each supported parameter type, the following information is extracted:

  • Name

  • Value

NameValueType
some_path_paths__path_file_1"D:\Projects\mapping.txt"str
some_file_paths__path_mesh_file"D:/Projects/mesh.cdb"str
example_float300.0float
example_int5int
example_vector_of_floats[12]VariantD
example_vector_of_ints[5]VariantD
example_vector_of_strings__0"first_entry"str
example_vector_of_strings__1"second_entry"str
example_vector_of_strings__2"third_entry"str
example_string"this_is_an_example"str
example_string"this_is_an_example"str
dictionary__another_float1.65float
dictionary__another_string"mode_select_1"str
dictionary__another_dictionary__param_11.0float
dictionary__another_dictionary__param_22int
dictionary__another_dictionary__vector_3[3]VariantD
Top-level Lists

The output is slightly different when the JSON contains a top-level list:

	[
		{
			"name_1": 1,
			"name_2": 2
		},
		{
			"name_3": 3
		}
	]
	

In this case each of the lists elements is grouped by the corresponding ID:

	0
		_0__name_1
		_0__name_2
	1
		_1__name_3