Fix JSON Unicode decoding and YAML float validation

This commit is contained in:
2026-11-28 23:25:12 +00:00
parent 9cc9f6f777
commit 9f7744bda8
4 changed files with 128 additions and 4 deletions

View File

@@ -31,8 +31,10 @@ errors include field paths and source positions where the YAML library or node
profile provides them. Structural errors include JSON instance locations.
Semantic duplicate-ID errors identify the collection and entry index.
The harness uses [go-yaml v4](https://github.com/yaml/go-yaml/tree/v4.0.0) for
parsing and [jsonschema v6](https://github.com/santhosh-tekuri/jsonschema/tree/v6.0.3)
The harness uses Go's standard JSON decoder for JSON syntax, including Unicode
surrogate-pair escapes, and [go-yaml v4](https://github.com/yaml/go-yaml/tree/v4.0.0)
otherwise. Both paths reject duplicate keys and preserve number precision. It uses
[jsonschema v6](https://github.com/santhosh-tekuri/jsonschema/tree/v6.0.3)
for Draft 2020-12 validation. It performs glossary ID uniqueness after structural
validation. It does not resolve domain references, check resource installation,
infer consumer support, populate defaults, or rewrite files.
@@ -60,6 +62,8 @@ must use JSON syntax. The same duplicate-key and semantic rules apply to both.
additionally recognized beyond machine numeric range. The adapter preserves
decimal precision as JSON numbers rather than converting through machine
floating point. NaN and infinities are errors.
Explicitly tagged floats must have valid numeric syntax before normalization;
empty values or incomplete forms such as `!!float e3` are errors.
- Anchors and aliases are accepted and resolved to values. Cycles are errors.
Anchors, aliases, comments, and formatting are serialization details.
- Standard mapping, sequence, string, integer, float, boolean, null, and