Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ from 0.9.

### Added

- Full support for [TOON specification 4.1](https://github.com/toon-format/spec/blob/v4.1.1/SPEC.md):
- Full support for [TOON specification 4.1](https://github.com/toon-format/spec/blob/v4.1.2/SPEC.md):
keyed tabular objects, nested field groups, comment lines, canonical empty
arrays, and every strict-mode check. All official fixtures of spec `v4.1.1` pass.
arrays, and every strict-mode check. All official fixtures of spec `v4.1.2` pass.
- A `json`-style interface: `dumps`, `dump`, `loads`, `load`, with keyword-only
options. `encode` and `decode` are aliases of `dumps` and `loads`.
- `default` and `sort_keys` options for encoding; `parse_float`, `parse_int`,
Expand Down
2 changes: 1 addition & 1 deletion scripts/update_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ///
"""Replace tests/fixtures with the conformance fixtures of a TOON specification release.

Usage: uv run scripts/update_fixtures.py v4.1.1
Usage: uv run scripts/update_fixtures.py v4.1.2
"""

from __future__ import annotations
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

The `encode/` and `decode/` directories are copied verbatim from the
[TOON specification repository](https://github.com/toon-format/spec/tree/main/tests/fixtures)
at tag `v4.1.1`. Do not edit them by hand: run `uv run scripts/update_fixtures.py <tag>`
at tag `v4.1.2`. Do not edit them by hand: run `uv run scripts/update_fixtures.py <tag>`
to replace them with another release.
8 changes: 8 additions & 0 deletions tests/fixtures/encode/primitives.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@
"input": "#hello",
"expected": "\"#hello\"",
"specSection": "7.2"
},
{
"name": "quotes a root string starting with U+FEFF",
"input": "\ufeff8",
"expected": "\"\ufeff8\"",
"specSection": "7.2",
"note": "Unquoted, a decoder would remove the U+FEFF as a byte-order mark (§12) and read the number 8",
"minSpecVersion": "4.1"
}
]
}
Loading