Expand description
The shared JSON shape of requests and results (see harness/lib/serialize.js and
tests/golden/README.md). Used by the golden runner and the chrono-rs-json CLI.
Structs§
- Request
- A parse request in the golden-case / harness shape.
Functions§
- byte_
index - JavaScript string index (UTF-16 code units) -> byte offset, or
Noneinside a character. - components_
to_ json - parse_
request - Parses
{text, config, reference, options}. Unknown option keys are an error (fail closed). - result_
from_ json - The inverse of
result_to_json, for a result in the context oftextandreference. Component key order isn’t carried (it doesn’t affect any output, only iteration order). - result_
to_ json - One result;
textis the full parsed text, to convertindexto UTF-16. - results_
to_ json - utf16_
index - Byte offset -> JavaScript string index (UTF-16 code units).