WORKED EXAMPLE · SYNTHETIC INPUT
Compare JSON values without confusing types
Two responses look similar, but a numeric field became a string or an empty array became an object. These changes can break consumers even when both documents parse.
阅读中文版
These inputs demonstrate reproducible behaviour; they are not customer incidents or evidence of real usage.
Reproducible input
{"count":1,"items":[]}Steps
- Load the sample into the left side of JSON comparison.
- Enter {"count":"1","items":{}} on the right and compare.
- Check the /count and /items differences. Replace the right side with the exact left sample and compare again.
Expected result
The differing number/string and array/object values are reported. Identical samples report equality. Invalid JSON is an error, never an equal comparison.
Limits and manual checks
Object member ordering is ignored by semantic comparison; array order matters. Duplicate keys and unsafe numbers must be resolved first. Use a text comparison when whitespace or signed bytes matter.
Technical reference