Empty TOML tables still preserve empty objects
Separate configuration layout from semantics using empty tables and numeric categories.
An empty table header and an inline table
The original author believed arguments = {} was missing. Both arguments objects remained in the reproduction as empty table headers. Table order, blank lines and representation can differ while preserving the empty object.
[service]
arguments = {}
# Equivalent alternative:
[service.arguments]
Numeric category belongs to the data model
Integer 1 and float 1.0 can behave differently in a receiving application. This conversion retains their categories while using binary64 for floats, so decimal rounding and underflow still occur. The original is retained separately.
| Input | Handling |
|---|---|
| 9007199254740991 | Exact integer |
| 9007199254740992 | Atomic refusal |
| 1.0 | Float category retained |
| 1.234567890123456789 | 1.2345678901234567 |
| 1e-400 | Float 0.0 |
| null / date / -0.0 | Atomic refusal |
Validate the parsed configuration
Check empty objects, array order, quoted dotted key names and number categories, then let the target application read the complete output. A text diff explains layout changes; it alone does not establish data loss.
- Inspect the complete converted payload for empty objects and array order.
- Check integer versus float categories against the receiving application.
- Keep the original download and conversion report alongside the converted configuration.
References
- Configuration conversion question
The reproduced configuration retains empty arguments objects as table headers. The issue is layout interpretation; browser preference and demand scale are unverified.
- TOML 1.1 specification
Tables, arrays-of-tables, scalar strings and typed numbers define the data model. This converter has an explicit finite-value profile.
Tools in this category
Expand a tool to see its steps, options and supported formats, then open its workspace.
TOML and JSON configuration converterConvert one configuration between TOML and JSON, retaining empty objects, arrays of tables and numeric types, with the original and report.
Convert one configuration between TOML and JSON, retaining empty objects, arrays of tables and numeric types, with the original and report.
Steps
- Choose TOML → JSON or JSON → TOML.
- Paste the actual configuration or select the original UTF-8 file.
- Convert and review empty objects, number categories and the report counts.
- Download the converted payload, source-original and conversion-report.json, then validate the configuration in its receiving application.
Available options
- Conversion direction
- TOML → JSON · JSON → TOML
Capabilities and limits
- Paste text or select one UTF-8 file, each up to 2 MiB. The file takes priority over stale pasted text; its name is limited to 512 UTF-8 bytes. Select the direction explicitly; extensions do not determine it.
- Accept TOML 1.1 tables, arrays of tables, empty objects, nested or mixed arrays, scalar strings, booleans and the numbers below. JSON requires a root object; empty TOML represents an empty object.
- Integers range from −9007199254740991 through 9007199254740991. TOML integers and JSON tokens without a decimal point or exponent are read as BigInt first; unsafe integers reject the whole conversion.
- Decimal/exponent tokens use finite IEEE 754 binary64 and retain the float-versus-integer category. Decimal rounding and underflow can occur: 1.234567890123456789 becomes 1.2345678901234567, and 1e-400 becomes float 0.0. Original number spelling and arbitrary decimal precision are not retained.
- JSON null, TOML date/time values, non-finite numbers, floating negative zero, raw JSON −0, duplicate keys, malformed grammar or Unicode reject the whole input. Values are never silently deleted, changed to strings or repaired. Date-looking strings remain strings.
- At most 100,000 logical value nodes and 64 container levels; the root object is level 1 and scalar leaves add no container level. The serialization work score is limited to 16 MiB, a conservative logical score rather than exact memory or CPU use. Complete conversion is limited to 8 MiB and its report to 64 KiB; no partial files are returned.
- One leading BOM is accepted and recorded; two are rejected. Original bytes and BOM stay intact. Comments, spacing, table layout, integer bases and number spelling normalize; TOML multiline newlines follow its data model.
- Conversion runs in a browser Worker; a 10-second timeout or cancel terminates it. The screen previews at most 4,000 Unicode code points; copy and download retain the complete converted payload. Contents are not uploaded.