Version: dev

Document I/O

Reading a document from a path, a string or a parsed value, and serializing it back to JSON.

OperationKindBindingsSummary
canonical_index_set_jsonfunctionPython, RustCanonical byte form of an index set (CONFORMANCE_SPEC.md §5.5.3): the distinct rows, each tuple serialised as a JSON array, in §5.5.1 sorted order, as compact UTF-8 JSON.
canonical_jsonfunctionJulia, TypeScript, Rust, GoEmit the canonical on-wire JSON form of an expression per RFC §5.4.6: keys sorted, no extraneous whitespace, shortest round-trip floats with trailing-.0 disambiguation for…
canonicalizefunctionJulia, TypeScript, Rust, GoCanonicalize an expression tree per discretization RFC §5.4.
emit_documentfunctionTypeScript, PythonProduce the reference-preserving, self-contained emitted document (esm-spec §9.6.4 rule 5, RFC out-of-line-expression-templates §7.5) from a source document rawSource (a…
emit_esm_stringfunctionTypeScript, PythonCanonical byte serialization of an emitted document (esm-spec §9.6.4 rule 5): 2-space indent, object keys sorted lexicographically (UTF-8 byte order) EXCEPT the entries of an…
format_canonical_floatfunctionJulia, TypeScript, RustFormat a finite Float64 per RFC §5.4.6.
load_documentfunctionJulia, TypeScript, Python, Rust, GoParse an ESM document held in memory as a native Julia dict — the same document a .esm file holds, just already parsed.
load_pathfunctionJulia, TypeScript, Python, Rust, GoRead and parse an ESM document from a filesystem path.
load_stringfunctionJulia, TypeScript, Python, Rust, GoParse an ESM document from JSON TEXT — held as a String, or streamed from an IO the method reads to a string first (the ::IO method is a sanctioned Julia decoration on the…
to_jsonfunctionJulia, TypeScript, Python, Rust, GoSerialize an EsmFile to wire-form JSON.
to_json_compactfunctionJulia, TypeScript, Python, Rust, GoThe single-line wire form.
write_pathfunctionJulia, TypeScript, Python, Rust, GoWrite an EsmFile to path as wire-form JSON.
load_optionstypeTypeScript, RustOptions controlling how the load* entry points parse and represent an ESM file.
loader_fieldtypeTypeScript, Python, Rust, GoA data-fed PARAMETER lowered to a flattened array input (esm-spec §8.5).
canonicalize_errorerrorJulia, TypeScript, RustError raised by canonicalize / canonical_json.

All topics