Quick answer
JSON Array vs Object – causes and fixes.
JSON Array vs Object
JSON Array vs Object – causes and fixes. Use a JSON validator to locate the error.
Common causes
- Using { for list.
- Using [ for key-value.
How to fix
- [] for lists; {} for key-value.
Use our JSON Validator to paste your input and see the exact error location. Validatethis.org offers free validators for JSON, XML, CSV, HTML, and more. Check /tools for the full list. For API access and integration, see /developers.
FAQ
- Array vs object?
- [] list; {} key-value.
- Mixed types in array?
- Allowed but often avoid.
Fix it now
Try in validator (prefill this example)