json
Typed JSON values and checked application decoders for Pooka.
pooka add pooka_json
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 for the rest.
Licence
Licensed under the Apache License, Version 2.0.