Key Takeaways
Check decoded names in the original object before accepting a parsed result. KitNelo preserves both retries members in this example, while JavaScript JSON.parse leaves the later value, 3. Resolve the conflict from the intended field meaning rather than assuming the last value is correct.
- Formatting preserves both retries members here; JavaScript parsing retains 3, so the two results establish different things.Read the supporting section: Reproduce the difference with two retries members
- Compare decoded names within each object rather than searching only for identical source spellings.Read the supporting section: Different escape spellings can identify the same name
- A repair needs the intended field meaning and receiver acceptance; the last value is not automatically the business answer.Read the supporting section: Confirm meaning before removing a member or changing structure
In this article
Formatting and field completeness are separate checks
RFC 8259’s object guidance recommends unique names. With duplicate names, receivers can retain the last value, reject the object or behave differently. Acceptance by one parser therefore does not establish agreement across receiving systems.
Our JSON and SQL formatting review covers types and query meaning. This guide addresses an earlier failure: writing a name twice within one object can still produce a successfully formatted document.
Reproduce the difference with two retries members
This original teaching input contains no credentials. Paste it into the JSON formatter, choose Format and check that retries: 1 and retries: 3 remain. The current formatter arranges source tokens; it neither flags duplicate names nor chooses a value for you.
Passing the same original text to JavaScript JSON.parse produces a retries value of 3. That is evidence about this JavaScript operation, not every language. Download the formatted JSON and inspect both names again: a completed download does not resolve the conflict.
{"job":"demo","retries":1,"retries":3}const raw = "{\"job\":\"demo\",\"retries\":1,\"retries\":3}";
console.log(JSON.parse(raw).retries); // 3 in JavaScriptDifferent escape spellings can identify the same name
The names "qty" and "\u0071ty" decode to qty. I-JSON’s object constraint compares names after escape processing and prohibits these duplicates. I-JSON is a stricter interoperability profile; this does not mean every RFC 8259 parser rejects the text as a syntax error.
For the fixed sample {"qty":2,"\u0071ty":5}, formatting preserves both spellings and JavaScript parsing leaves qty equal to 5. Searching only for identical quoted strings misses this case. A programmatic check needs awareness of string escapes and object scope, rather than a regular expression counting words across the file.
Two separate objects in an array may each contain one qty without creating this kind of duplicate. Compare names within their containing object. For a separate explanation of character representation, see encoding and Unicode round-trip checks.
Confirm meaning before removing a member or changing structure
If the configuration owner confirms that the intended retry count is 3, a valid repair is {"job":"demo","retries":3}, retaining the original for comparison. If the values describe distinct records, use an array or different fields under the receiving contract. Do not invent a sum of 1 and 3.
Submit the unique-name version to the actual receiver’s test environment and inspect the field and configuration behavior. Record resolution only after source review, structural checks and receiving behavior agree. Without receiver access, leave that acceptance step unresolved.
| Source structure | Finding | Next action |
|---|---|---|
| Two retries members in one object | Conflicting field meaning | Confirm one value or redesign the fields |
| qty and its escaped equivalent | Duplicate decoded name | Compare semantic names |
| One qty in each of two array objects | Not a duplicate within one object | Check each object and the receiver contract |
Keep the original and the reason for the repair
Record the file version, containing object, conflicting values, chosen change and the field owner or contract supporting it. Reproduce sensitive configurations with a redacted small sample rather than a public ticket containing secrets. A formatter does not validate a schema, required fields, business rules or permission settings.
Further reading & sources
Put the guide into practice
Open the relevant tool, preview the result and check your exported file.


