Expand description
Conversion between the merge IR and the native JSON/TOML value types.
Merge runs on knf_core::Value, so these fire exactly twice per run: once
per layer on the way in, once on the whole document on the way out. Free
functions rather than From/TryFrom impls because both sides are foreign
types — impl From<toml::Value> for knf_core::Value names nothing local and
does not compile.
Structs§
- Null
InToml - Nulls survived into a document being converted to TOML.
Functions§
- from_
json - JSON → IR. Total: every JSON value has an IR counterpart.
- from_
toml - TOML → IR. Total: datetimes keep their source spelling rather than becoming strings, which is what lets a TOML datetime survive a mixed-format merge.
- replace_
nulls - Substitutes
placeholderfor every null in the document. - to_json
- IR → JSON. Total; a datetime renders as the string JSON would have to use.
- to_toml
- IR → TOML, rejecting nulls first.