# json.as_text · Rell standard library · Chromia Docs (concept)

> pure function as_ text(): text Convert this JSON text value to text. Note that this method is different to json.to_text() . This method retrieves this text

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/json/as_text/

FUNCTION

# json.as\_text

```signature
pure function as_text(): text
```

Convert this JSON text value to text.

Note that this method is different to `json.to_text()`. This method retrieves this text-typed JSON
value as Rell text, and throws an exception if this JSON value is not of text type. `json.to_text()`
converts this entire JSON value to its text representation, regardless of what type of JSON value
this is, and does not throw an exception.

**Throws**

* `exception` — if this JSON value is not text

Since 0.14.16

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