Skip to content

Instantly share code, notes, and snippets.

@trentm
Last active November 27, 2015 17:58
Show Gist options
  • Save trentm/45940fadbfaace8d2f50 to your computer and use it in GitHub Desktop.
Save trentm/45940fadbfaace8d2f50 to your computer and use it in GitHub Desktop.
[{"foo":"bar"},]
{"foo": "baa tab"}
@trentm
Copy link
Author

trentm commented Nov 27, 2015

$ json -nf foo.json
json: error: "foo.json" is not JSON: SyntaxError: Unexpected token

$ json -nf comma.json
json: error: "comma.json" is not JSON: Unexpected ']' at line 1, column 16:
        [{"foo":"bar"},]
        ...............^

Why no context on the error in foo.json that has an illegal literal tab in the string?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment