-
Notifications
You must be signed in to change notification settings - Fork 71
Test Key Encoding and Unicode in Parser #319
Copy link
Copy link
Open
Description
Background
When replacing the JSON parsing engine in PR #292, one of the riskiest areas is the handling of text encoding and Unicode, particularly within JSON keys.
Description
We must create extensive test cases to cover various key encoding and Unicode scenarios. These tests must run against both the legacy (json-iterator) and the new (json/v2) implementations to guarantee they produce the exact same in-memory values.
The scenarios that need coverage include:
- Escaped/encoded keys: e.g., keys formatted like
"\u0041". - Multi-byte Unicode keys: e.g.,
"Iñtërnâtiônàlizætiøn,💝🐹🌇⛔". - Invalid Unicode characters: Keys containing byte sequences that do not form valid UTF-8/Unicode characters. We need to verify how both implementations handle/reject these.
Code Pointers
- File for New Tests:
typed/parser_test.go - Function to Test:
readObjectintyped/parser.go - Reference PR Comment: Discussion Link
Metadata
- Priority: P0
- Complexity: Easy
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels