feat(encode): add the InlineTables option

Assisted-by: DeepSeek V4.1 Flash
This commit is contained in:
2026-09-19 12:18:30 +02:00
parent 8f85bb68fa
commit 959eaba4b0
6 changed files with 308 additions and 6 deletions
+4
View File
@@ -24,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
toml-test tagged JSON from stdin and writes the TOML document it describes.
The compliance suite now runs the encoder as well as the decoder, 214
encoder cases against the tagged JSON of the valid corpus.
- `Encoder.InlineTables(threshold)`: a sub-table whose single-line rendering is
at most `threshold` bytes is written as an inline table instead of a header
section, which shortens a document of small tables. An array of tables keeps
its header form, because its inline form would re-parse as a value array.
### Changed