By YiyaoPublished
Parse your sample before converting it
Paste a redacted JSON sample and select Parse JSON. Check the root type and inspect the fields shown in the tree. A parser tells you which JSON structure it reads. Your application's schema and business rules are separate checks.
Know what a root type means
A root object can hold named fields, while an array contains a sequence of entries. A string, number, boolean or null can also be a valid root value. Your integration may still require an object or array even when another root value is syntactically valid. Compare the reported type to the receiving contract.
Diagnose an example without changing the data
Start with {"shipment_id":"0042","items":[{"units":2}]}. It has an object root, the identifier is a string, and items contains one record. Add a trailing comma before the closing array bracket and parse again. The parser should flag invalid syntax, not silently repair the text.
Read a warning before deciding who should fix the source
| Result | Check next |
|---|---|
| Valid syntax and wrong root type | Compare the interface specification and export mode |
| Invalid syntax | Look near the reported or preceding delimiter before requesting a new export |
| Repeated object key | Route to the source owner; different consumers can handle repeats differently |
| Duplicate-looking identifiers across different objects | Validate the identity policy in the receiving application |
Questions before opening a real file
Does parse success prove rows are complete? No. Check expected fields and record counts separately.
Should I use this to minify JSON? Check the syntax here first. Once the input is valid, use the JSON Minifier if you need a compact copy.
Move to the next operation with a valid sample
Export a safe case that reproduces the problem. Rerun the local check when the source changes, then confirm the shape, data types and business values in the destination workflow.
For a local file, open a copy in a text editor and confirm it contains the expected JSON before parsing.
