improve output on invalid JSON in an example
- Dominant language
- CoffeeScript
- Stars
- 30
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
When an example isn't valid JSON, the error you get looks like this:
AssertionError: Invalid JSON:
undefined
Error: expected [Function] to not throw an error but 'SyntaxError: Unexpected string' was thrown
Followed by a stack trace. It would be nice if:
a) the error identified that it was the example and not the json schema that was invalid.
b) the error provided more information about what was invalid, perhaps via something like [json-lint](https://github.com/zaach/jsonlint)
This seems in the same vein as issue #19.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the invalid-JSON example described in the issue and compare the behavior with issue #19. Done means the error clearly identifies the example rather than the schema and provides useful information about the invalid JSON, potentially using json-lint as suggested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript, json
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100