Skip to main content

Module json_value

Module json_value 

Source
Expand description

A tiny recursive-descent JSON reader over the dynamic Value model.

Two callers: varar.lock.json parsing in crate::drift, and the conformance gates, which compare an artifact against a golden by CONTENT rather than by bytes — the golden is one file generated by the TypeScript reference, and key order, indentation and escaping belong to whichever writer produced it, not to the contract.

Functions§

parse_json_value
Parses JSON text into a Value, or None on malformed input. Integral numbers become Value::Int, the rest Value::FloatValue’s derived equality deliberately treats Int(2) and Float(2.0) as different.