pandastrike/jsck

Feature request: line numbers on error

Closed this issue · 2 comments

braco commented

Would be nice to use as a linter.

Meaning errors caused by bugs in JSCK, or errors in the validated document, or ...?

JSCK doesn't deal directly with strings containing JSON; it expects the schemas and documents to be JavaScript objects. I typically use either CoffeeScript or YAML to represent my schemas and documents, providing them to JSCK only after parsing.

Line numbers for the inputs are thus impossible. What is possible, and is actually better, is using JSON Pointers in validation error explanations to point directly to the section of schema and section of document that are concerned.