|
From googling to triage COMPASS-3727
1. Show detailed error message of why my JSON is invalid.
https://www.npmjs.com/package/jsonlint provides output like:
Error: Parse error on line 1:
|
...esentiustoodio.us"}{"_id":{"$oid":"5864
|
----------------------^
|
Expecting 'EOF', '}', ',', ']', got '{'
|
2. Handle invalid dirty JSON automatically.
Needs more googling (search for dirty || loose JSON parsing) but have used npm modules in the past that can handle typos like the above without the user needing to fix and try again.
|