Expand description
The JSON storage profile: a strict reader and the canonical writer.
See docs/spec/ir/schemas/v4/yaml-profile.md’s JSON twin: this reader refuses what
serde_json::Value alone cannot see — a repeated object member, and a document nested past
the ceiling every reader in this crate shares — before it lets serde_json fold the text into a
value tree.
Constants§
- MAX_
DEPTH - How many nested containers a document may carry, matching the reference reader’s own ceiling
(
MAX_DEPTHinpackages/ir/src/codec/json/value.ts) and the YAML reader’scrate::ir::yaml::MAX_DEPTH.
Functions§
- read
- Reads a JSON document under the storage profile: no repeated object member, no more than
MAX_DEPTHnested containers, and otherwise whateverserde_jsonaccepts. - read_
ir_ file - Reads a profile-conforming JSON document as an
IRFile, with the decoder’s warnings. - write_
canonical - Writes a value in the JSON profile’s canonical text form.
- write_
ir_ file - Writes an
IRFileas canonical profile JSON, with no trailing newline.