# Check for Duplicate Keys Before Importing JSON

https://ferkesh.net/zh/knowledgebase/article/json-duplicate-key-import-preflight

A JSON object can have repeated names in its source text. The standard recommends unique names for interoperability. Parsers may reject duplicates, keep one value or represent the situation differently.

![Raw object: A repeated field; Parser result: One value may be lost; Import gate: Explicit duplicate check.](https://ferkesh.net/kb-media/ferkesh-guide-diagrams-batch-16.svg#json-duplicate-key-import-preflight)

## Start with a synthetic object

Compare a clean object with one containing two occurrences of a status property. Review the raw source before formatting. If the formatter displays only one status after parsing, the other occurrence is already lost from the displayed representation.

## Define an import gate

For important data, use an approved validator that reports duplicate names before converting the document to ordinary objects. Decide whether the importer should reject ambiguity or require owner correction. Keep the original file for tracing the decision.

## Verify a staging import

Use one expected success fixture and one expected rejection. Compare IDs, field types and status values after import. Syntax validity establishes that the shape can be parsed. It cannot guarantee unique names or agreement with your receiving data model.

## Related Ferkesh Knowledge Base guides

- [Convert CSV With Quoted Fields to JSON Safely](https://ferkesh.net/knowledgebase/article/ferkesh-csv-json-quoted-fields)
- [How to Review a WooCommerce Product CSV Before Import](https://ferkesh.net/knowledgebase/article/review-woocommerce-catalog-csv-before-import)

## Ferkesh Tools

- [Json Formatter Validator](https://tools.ferkesh.net/json-formatter-validator/)

## Official references

- [The JavaScript Object Notation (JSON) Data Interchange Format](https://www.rfc-editor.org/info/rfc8259/)

Last reviewed November 27, 2026.
