JSON Source node
Use the JSON source node to import data from a JSON file into an SPSS® Modeler stream, using UTF-8 encoding. Data in a JSON file can be in form of object, array, or value. This JSON source node only supports reading in an array of objects, and the object can't be nested.
Example JSON data:
[
{
"After": 122762,
"Promotion": 1467,
"Cost": 23.99,
"Class": "Confection",
"Before": 114957
},
{
"After": 137097,
"Promotion": 1745,
"Cost": 79.29,
"Class": "Drink",
"Before": 123378
}
]
When SPSS Modeler
reads data from a JSON file, it performs the following translations.
JSON Value | SPSS Modeler Data Storage |
---|---|
string | String |
number(int) | Integer |
number(real) | Real |
true | 1(Integer) |
false | 0(Integer) |
null | Missing values |
The following options are available in the JSON source node dialog.
JSON data source. Select the JSON file to import.
JSON string format. Specify the format of the JSON string. Select Records if your JSON file is a collection of name and value pairs. The JSON source node imports names as field names in SPSS Modeler. Or select Values if your JSON data only uses values (no names).