# gtv.fromJSON · Rell standard library · Chromia Docs (concept)

> pure static function fromJSON(json: text ): gtv Deprecated (for removal): Use 'from_json' instead Obtain a GTV from JSON text. First parses a JSON value fr

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/gtv/from-j-s-o-n/

FUNCTION

# gtv.fromJSON

```signature
pure static function fromJSON(json: text): gtv
```

**Deprecated** (for removal): Use 'from\_json' instead

Obtain a GTV from JSON text.

First parses a JSON value from text, and then converts the JSON value to a GTV.

Equivalent to `gtv.from_json(json(text))`.

**Parameters**

* **json** — the JSON text to decode

**Throws**

* `exception` — when: - the JSON text is ill-formed - the JSON value cannot be converted to a GTV

Since 0.9.0

**Alias of** [gtv.from\_json](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/gtv/from_json/)

---

```signature
pure static function fromJSON(json: json): gtv
```

**Deprecated** (for removal): Use 'from\_json' instead

Convert a JSON value to a GTV.

Inverse of `gtv.to_json()`.

**Parameters**

* **json** — the JSON to convert

**Throws**

* `exception` — if the JSON value cannot be converted to a GTV

Since 0.9.0

**Alias of** [gtv.from\_json](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/gtv/from_json/)

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/%5Broot%5D/gtv/from-j-s-o-n.html)Generated API reference, mirrored from the live docs
