Current section
Files
Jump to
Current section
Files
pooka_json
README.md
README.md
# json
[](https://hex.pm/packages/pooka_json)
[](https://pooka-json.hexdocs.pm/)
[](https://github.com/pooka-lang/json/actions/workflows/test.yml)
Typed JSON values and checked application decoders for Pooka.
```sh
pooka add pooka_json
```
```pooka
import pooka/json/decode
let count = decode.field("count", decode.int())
assert decode.read("{\"count\":3}", count) == Ok(3)
```
Parsing uses Erlang’s native JSON parser. Objects preserve order and duplicate keys; field lookup uses the first occurrence. `pooka/json/decode` checks the typed JSON tree and reports field paths. Use bounded decoding for untrusted input.
See the [API documentation](https://pooka-json.hexdocs.pm/) for the rest.
## Licence
Licensed under the [Apache License, Version 2.0](LICENSE).