fromJson

Syntax

fromJson(X)

Arguments

X is a JSON string that complies with DolphinDB specification.

Details

Converta a JSON string that complies with DolphinDB specification to a DolphinDB variable.

A JSON string that complies with DolphinDB specification has at least the following 3 key-value pairs: form, type and value.

For a table, the key-value pair 'name' can indicate column names.

Examples

x=1 2 3
y=toJson(x)
y;
// output
{"name":"x","form":"vector","type":"int","size":"3","value":[1,2,3]}

fromJson(y);
// output
[1,2,3]

Related functions: toJson