The duplicate-key information most parsers throw away
Why json-buf performs a source-aware duplicate pass before ordinary object access.
August 25, 2026 · 5 minute readMaps cannot remember a collision
Once an object has been materialized as a map, only one value normally remains. Duplicate detection must happen while the deserializer is visiting members.
Path context matters
A warning that says duplicate key id is less useful than /orders/42/id. The visitor maintains the current JSON Pointer through arrays and nested objects, escaping pointer characters as it descends.
The check is advisory
Strict syntax validation and duplicate interoperability are separate signals. That distinction lets callers decide whether duplicate keys should warn or fail without weakening the parser.