Repository navigation
v0.6.0
This release implements TOON spec v4.1 (#79).
The decoder and encoder were rewritten against the specification; every API change
below follows from that.
Removed
Key folding and path expansion left the spec in v4.0. The options that drove them
are gone, with no replacement:
EncodeOptions::key_foldingandEncodeOptions::flatten_depth, plus the
with_key_foldingandwith_flatten_depthbuildersDecodeOptions::expand_pathsandwith_expand_paths- The
KeyFoldingModeandPathExpansionModeenums
Decoder options are now exactly strict and indent (spec §13):
DecodeOptions::delimiterandwith_delimiter— the delimiter is detected from
the input per §11.2.EncodeOptions::with_delimiteris unaffected.DecodeOptions::coerce_typesandwith_coerce_types— the old parser never read
this field, so removing it changes no behaviourdecode_no_coerceanddecode_no_coerce_with_options— usedecodeand
decode_strict_with_options
Four ToonError variants that no code path produced any more, with their
constructors. An exhaustive match on ToonError needs updating:
InvalidCharacter,UnexpectedEof,InvalidDelimiter,LengthMismatchToonError::invalid_char,ToonError::length_mismatchand
ToonError::length_mismatch_with_context
Changed
-
StreamingEncodeOptionsis removed and thejson_streamsignatures lost a
parameter. v4.1 selects the encoded form from a value's whole shape, so no header
can be written before its entire subtree has been read and bounded-memory
streaming encode is no longer implementable. These functions now parse the input
in full and run the in-memory encoder; they remain as I/O conveniences.// 0.5.0 encode_json_reader(reader, &encode_options, &streaming_options)?; encode_json_stream(reader, writer, &encode_options, &streaming_options)?; // 0.6.0 encode_json_reader(reader, &encode_options)?; encode_json_stream(reader, writer, &encode_options)?;
-
layout::FieldDescriptor::nestedchanged fromOption<Box<NodeLayout>>to
Option<Vec<FieldDescriptor>>, so it can carry nested field groups (layout
feature). -
Modules and items that were
pubbut never part of the documented API are gone:
decode::scanner,decode::expansion,decode::validation,encode::folding,
encode::writer,encode::primitives,constants::STRUCTURAL_CHARSand
utils::QuotingContext. -
TUI internals behind the
clifeature: theActiondiscriminants shifted and the
AppState::toggle_*and flatten-depth methods are gone. These back the binary and
have no library consumer.
Added
utils::unescape_stringis now re-exported at the crate root.
Fixed
- non-ASCII key quoting, quoted dotted keys, and arrays of empty objects (#83)