module OutputBuilderTomlSerializer

Overview

TOML emission shared by the -f toml builder and diff mode's print_toml.

Both hand-roll TOML from the same Endpoint#to_json shape, and both had their own copy of these three methods. The copies had already drifted: only the toml.cr one quoted non-bare keys, so diff.cr would have emitted a key containing a dot as a dotted table path and corrupted the document. That is latent rather than live — every key in the endpoint JSON is bare-safe today — but it is exactly the kind of divergence a shared module prevents, and a change to one copy silently left the other behind.

Direct including types

Defined in:

output_builder/toml_serializer.cr