The Vanishing Keys: 600 of 3,000 Keys Silently Dropped by Standard Parsing
A duplicated key in a data object does not argue with itself. It does not raise an error, log a warning, or keep both values for later inspection....
A duplicated key in a data object does not argue with itself. It does not raise an error, log a warning, or keep both values for later inspection. Under the standard reading rule, the later value simply replaces the earlier one, and the earlier one is gone, as if it had never been written. In this test, hand-written objects carrying duplicated keys lost a fifth of all the key occurrences they contained, and in most of those losses the value that survived was different from the value that vanished, so the record that emerged stated something different. A companion test on arrays showed the mirror problem: where objects lose duplicates without a word, arrays keep them without a word, including copies that differ by a single trailing space. Silence, in both directions, is the common thread.
What The Vanishing Keys means
The Vanishing Keys means the silent loss that occurs when the same key appears more than once inside a single object and a reader keeping only one value per key discards the rest without reporting the discard. A finished object holds one value for each key, so a reader building one from text containing a repeated key must choose, and conventionally the last occurrence wins. The vanishing is not the choice itself. The vanishing is that the choice is made invisibly: the count of discarded occurrences is not reported, and when the competing values differ, the overruling is not reported either. A consumer of the parsed object sees a clean, ordinary record, with no way to know that it is the residue of a conflict.
The concept also has an array-side counterpart. Where an object collapses repeated keys to one value, an array keeps every element, including elements that represent the same business record twice over. Deduplication there is a separate, explicit decision, and the sameness definition chosen for it changes the count, as the array results below show. It differs from The Hidden Duplicate Share, where duplicate records hide behind differing forms; here the duplicates sit inside one object, collapsed by the parser itself.
Objects that keep less than they were given
The object test used 800 hand-written objects assembled as text, so that repeated keys could be present at all. Of those, 400 contained one repeated key whose two occurrences carried different values, a status written first as one value and then overwritten by another. A further 200 contained one repeated key whose occurrences carried the same value. The remaining 200 contained no repeated key and served as the control group.
Counting key occurrences across all 800 objects gives 3,000 occurrences in the written text. After standard parsing, the resulting objects held 2,400 keys. The difference, 600 discarded occurrences, is 20.0% of everything written. Every discard happened silently. No object failed to parse, and the control group parsed exactly as expected, confirming that the loss is attributable to repetition itself.
Within the 600 discards, the split matters more than the total. In 400 cases the discarded occurrence carried a different value from the one that survived, so parsing changed what the record said. In 200 cases the discarded occurrence carried the same value, so the parsed record was faithful despite the repetition. A team told that 400 discards were value-changing overrides is looking at 400 records whose stated content depends on occurrence order in a text nobody may have reviewed. Order in a hand-assembled or machine-merged file is often an accident of how fragments were combined. Letting that accident decide the content of a record, invisibly, is the concrete risk the concept names.
An aware reader that observed key occurrences in pairs as they arrived detected all 600 repeated occurrences, 600 of 600. The information needed to report every repetition is present at reading time; a pipeline that wants an audit trail needs only a reader that counts what it is about to discard.
Arrays that keep more than they should
The array test used a single array of 600 objects. By business key, defined as the combination of an identifier and an email address, the array contained only 300 unique records. The other 300 elements were surplus copies: 200 were exact duplicates, identical in every field to another element, and 100 were near duplicates, sharing the identifier and email of another element and differing only by a trailing space in the name field.
Standard parsing kept all 600 elements, without error and without deduplication, which is correct behaviour for a parser and a trap for everyone downstream. The measured surplus depends entirely on the definition of sameness a later cleaning step chooses. Under a business-key definition, the surplus is 300 elements, the 200 exact copies plus the 100 near copies. Under an exact, field-by-field definition, the surplus is only 200, because the 100 near copies are, exactly speaking, different objects. The gap between them, 100 records, is the population that survives an exact deduplication pass while still representing records the business already has.
How this was measured
The objects and the array in this test were synthetic, assembled as text by a measurement script rather than exported from any live application or customer system. The script hand-wrote 800 objects in three constructed groups, 400 with a value-changing repeated key, 200 with a same-value repeated key, and 200 with no repetition, plus one constructed array of 600 elements built from 300 unique business keys with exact and near copies added deliberately. Because the seed is fixed at 42, every rerun assembles identical texts. The readers — ordinary parsing plus a pairs-aware reader that watches repeated keys before they collapse — are deterministic code written for this script alone: fixed rules, nothing learned, nothing imported from outside data. No commercial product is being measured here, and no vendor parser, database, or platform was put to the test. All counts are constructed quantities and are stated as such: 800 constructed objects, 3,000 constructed key occurrences, and one constructed array of 600 elements.
Questions, answered
Does a repeated key cause a parse error? No. In this test every one of the 800 objects parsed successfully, including all 600 objects that contained a repeated key. Standard parsing resolves the repetition by keeping the last value and discarding the earlier occurrence, without any error or warning, which is precisely why 600 of 3,000 key occurrences could vanish without trace.
How much of the loss actually changed the data? Two thirds of it. Of the 600 discarded occurrences, 400 were value-changing overrides in which the surviving value differed from the discarded one, and 200 were same-value repetitions in which the parsed record matched what either occurrence stated. Reporting the split tells a reviewer exactly how many records state something that an earlier occurrence contradicted.
Can repeated keys be detected before they vanish? Yes, completely, on this evidence. A reader that observes key occurrences in pairs as they arrive detected 600 of 600 repetitions, covering both the value-changing and the same-value cases. The information exists at reading time and is lost only because collapsing readers discard it by design, so adding detection is a choice about reading method.
Why did exact deduplication miss some surplus array elements? Because 100 of the surplus elements were near duplicates rather than exact ones. They shared the business key with another element and differed only by a trailing space in the name. An exact comparison treats them as distinct, so an exact pass counts a surplus of 200, while a business-key pass counts the full surplus of 300 in the same 600-element array.
What should a pipeline report after parsing objects at scale? At minimum, three numbers: how many key occurrences were discarded, how many discards changed a value, and how many were harmless same-value repetitions. Those numbers convert an invisible default into an auditable event. A batch in which value-changing overrides number 400 deserves review before its records are trusted.
Summary
The Vanishing Keys is the quiet arithmetic of repeated keys under standard parsing. In this test, 800 objects containing 3,000 key occurrences emerged from parsing with 2,400 keys, a silent loss of 600 occurrences, which is 20.0%. Of that loss, 400 discards changed values and 200 did not, and an aware reader proved that all 600 repetitions were detectable at reading time. Alongside the objects, a 600-element array kept 300 surplus copies, 200 exact and 100 near. Repetition inside objects is destroyed without a report, and repetition inside arrays is preserved without a report. Either way, the report is the missing piece.
Sources
- SmartDataAI measurement W4 (duplicate keys in JSON), batch 6, run 2026-11-23; the script lives at evidence/sd_batch6_measurements.py and its output at evidence/sd_batch6_results.json in this batch's evidence folder.
- Construction note: objects, repeated keys, the array and both readers were all produced by the seeded script (seed 42); full construction details sit in the measurement section above.