pandastrike / jsck

JSON Schema Compiled checK
MIT License
160 stars 14 forks source link

Feature request: line numbers on error #96

Closed braco closed 8 years ago

braco commented 8 years ago

Would be nice to use as a linter.

automatthew commented 8 years ago

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

automatthew commented 8 years ago

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.