module

TOML::TestFormat

JSON encoder that mirrors the format expected by the official toml-lang/toml-test interop suite.

Each leaf TOML value is wrapped in a JSON object of the form { "type": "<kind>", "value": "<text>" } where <text> is always a JSON string (even for integers and floats). Tables become regular JSON objects, arrays become JSON arrays.

Internal — exposed only so bin/toml-decoder can import it. Not part of the public API.

Instance methods

encode(doc : Document) : String
Source

Nested types