# `ToonEx.JSON`
[🔗](https://github.com/ohhi-vn/toon_ex/blob/v1.1.0/lib/toon_ex/convertor/json.ex#L1)

Transforms between JSON and TOON format.

Simply using Elixir JSON to transforms between JSON and TOON.

Example:

```elixir
text =
"[4]:
  - 1
  - 2
  - hello
  - test:
      k1: 1"

json = ToonEx.JSON.from_toon!(text)
# "[1, 2, "hello ", {"test": {"k1": 1}}]"
```

# `from_toon`

```elixir
@spec from_toon(binary()) :: {:ok, binary()} | {:error, term()}
```

# `from_toon!`

```elixir
@spec from_toon!(binary()) :: binary()
```

# `to_toon`

```elixir
@spec to_toon(binary()) :: {:ok, binary()} | {:error, term()}
@spec to_toon(binary()) :: binary()
```

# `to_toon!`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
