module TOML::TestFormat

Overview

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.

Extended Modules

Defined in:

toml/test_format.cr

Instance Method Summary

Instance Method Detail

def encode(doc : Document) : String #

[View source]