BackPrevious Page Next PageNext

Extracting Metadata from JSON Data

Extracting method

Data type conversion table

A JSON metadata contains a root element whose element type can be object class or object array. An object class or object array element contains some elements whose element type can be object class,  object array, attribute or simple data array with the data type of string, number or Boolean. JSON objects in an array should have the same structure, the members (name/value pairs) in an object cannot be of the same name, and for a nested array, only the first layer will be kept.

Extracting method

When a JSON schema is transformed to a relational schema automatically, RDBMS tables will be built based on the schema, and the following rules will be applied:

Data type conversion table

Before the JSON data type defined in the JSON file can function with JReport Designer, it should first be converted into a corresponding SQL data type when extracting metadata from JSON data, following the rules below.

JSON Data Type SQL Data Type
String (following the format Combined date and time representations in ISO 8601) TIMESTAMP
String (following JDBC timestamp escape format) TIMESTAMP
String (following the format Calendar dates in ISO 8601) DATE
String (following the format Times with time zone designators in ISO 8601) TIME
String VARCHAR
Number (excluding fraction and exponent) INTEGER
Number (including fraction and exponent) NUMERIC
Boolean BOOLEAN

Notes:

BackPrevious Page Next PageNext