You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix Unicode string decoding in the dependency-free JSON parser #351
utils/src/json.rs parses JSON strings byte by byte. Raw non-ASCII UTF-8 bytes are currently pushed as independent characters, and valid \uXXXX escapes are rejected.
This parser is used for Wave metadata such as the standard-library manifest, so valid JSON strings must round-trip without corruption.
Scope
Preserve raw UTF-8 text in JSON strings.
Decode \uXXXX escapes.
Combine valid UTF-16 surrogate pairs for code points outside the BMP.
Reject malformed hexadecimal escapes and lone surrogates.
Preserve the existing handling of quotes, slashes, control escapes, and unterminated strings.
Tests
Add unit tests in the utils crate for:
Raw Korean and emoji text.
BMP Unicode escapes.
A surrogate-pair escape.
Invalid hex digits.
Lone high and low surrogates.
Parser/writer round trips.
Completion criteria
Valid Unicode JSON strings parse without corruption.
Invalid Unicode escapes return an error rather than panicking.
cargo test --locked --all-targets --jobs 2 passes.
Activity