Bounded, duplicate-rejecting JSON admission for authority boundaries.
Objects are decoded as ordered key-value pairs first, then recursively converted to ordinary maps only when every object key is unique. Decoding and trusted in-memory admission share the same depth, node, UTF-8, finite number, timeout, and heap limits.
Summary
Types
@type error() :: :invalid_json | :duplicate_json_key | {:duplicate_json_key, [binary() | non_neg_integer()]} | :json_depth_exceeded | :json_node_limit_exceeded
@type located_error() :: error() | {:invalid_json, [binary() | non_neg_integer() | {:map_key, non_neg_integer()}], :improper_list | :invalid_object_key | :invalid_utf8 | :non_finite_float | :unsupported_value}
Functions
Admits a trusted in-memory JSON value under the same limits as decode/2.
Structs, non-binary keys, invalid UTF-8, improper lists, and non-finite floats are rejected.
Decodes one JSON value under the shared structural admission limits.
Options may only narrow :max_depth and :max_nodes.
Decodes one JSON value and retains the bounded parent location of a duplicate.
Location segments are internal evidence. Callers must authorize them against their own closed schema before projecting a public path.