Skip to content

TLio 0.8.0

Choose a tag to compare

@FransVanEk FransVanEk released this 20 Aug 15:25
· 79 commits to main since this release

Cross-format parity: null is an unfilled container everywhere

One document written in JSON, XML and YAML now behaves the same under the same commands — the class of failures behind "add: cannot add property to a primitive node" on empty/null nodes is gone.

Fixed

  • All formats — add/put now upgrade a null-valued node to an object (or to an array at position [0]), and deep paths build through null intermediates. set stays strict. A null document root keeps the warning (nothing holds it).
  • System.Text.Json — JSON null is C# null in JsonNode, so null-valued fields were invisible to SelectNodes: remove, rename, copy, move, merge and =fetch silently no-opped where Newtonsoft worked. The fetcher now hands out slot-tracking placeholders (NullSlots) the adapter reads as null and writes through. Also fixed: a flatten crash on null leaves, Replace moving a property to the end of the object, and Parse("null") returning an unusable null instead of failing loudly.
  • XML — whitespace-only element content no longer classifies a node as primitive (a whitespace-preserved <customer>\n</customer> accepts writes; a deliberate " " string still reads back as text). compare gives an empty element the compact null verdict instead of a type-difference record.
  • YAML — a bare key: (plain empty scalar) is now null, the YAML twin of the empty XML element; a quoted '' stays a real empty string. Sequences are no longer padded with empty mappings to reach a written position — a position that does not exist is refused, as in JSON.
  • MCP server — XML documents parse attached to their document, so absolute paths (/order/customer) resolve in tlio_analyze.

Deliberate divergences

The XML empty element cannot say which empty thing it is; the one-of-two readings each site picks (merge with a null source keeps the target, add at [0] starts an array, compare verdicts null) are recorded in docs/behaviour-decisions.md section E.

Validation

85-case cross-engine differential matrix (Newtonsoft, System.Text.Json, YAML, XML slash + native XPath); 70 new regression tests and 8 new parity fixtures; 2,369 tests green.