Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure error location by custom parsing
The native JSON.parse does not always provide the error location at the end of the error message. These two invalid inputs either include or not include the error location and it is different with Node.js 18 and Node.js 20: { "foo": \"baz } { "foo": baz } If the locatoin is missing, let us parse the input once more by the custom parser, which always provides the error location.
- Loading branch information