# fromJson {#fromjson}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`fromJson(X)`

## Arguments {#arguments}

**X** is a JSON string that complies with DolphinDB specification.

## Details {#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 {#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](../t/toJson.md)

