Thank you. I started down that path but found myself getting away from the very things that make JSON so compelling - simplicity and brevity.
My number one goal was to create a schema mechanism where the schema matches the exact structure of the data document it's representing.
I think you're going to see implementations of the spec, but they won't be very friendly to use by human beings. It's difficult to see where the data document structure ends and the schema itself begins.
I have found the approach I implemented to easily facilitate discussions, understanding, communication and design. And it's very easy and natural to learn and use.
And by embedding an example in the schema itself I accomplish two important things:
1 - a meaningful example data document is easily extracted; this makes the schema self documenting, but better yet, when combined with REST services and custom media types it makes it very easy to extract REST resource/API documentation, in real time, for the REST resources - all without having to provide any additional documentation.
2 - the schema then becomes self-validating; I can extract the example document and run it back thru the schema validator to make sure it works. And, this can be used for both positive and negative testing.
Thoughts?
Russ
Last edit: Russ Jackson 2014-07-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A VERY NICE library for json schema I have found.
Is there any plan to implement the JSON Schema Core specification.
Currently the lastest draft is v4.
http://json-schema.org/documentation.html
Thank you. I started down that path but found myself getting away from the very things that make JSON so compelling - simplicity and brevity.
My number one goal was to create a schema mechanism where the schema matches the exact structure of the data document it's representing.
I think you're going to see implementations of the spec, but they won't be very friendly to use by human beings. It's difficult to see where the data document structure ends and the schema itself begins.
I have found the approach I implemented to easily facilitate discussions, understanding, communication and design. And it's very easy and natural to learn and use.
And by embedding an example in the schema itself I accomplish two important things:
1 - a meaningful example data document is easily extracted; this makes the schema self documenting, but better yet, when combined with REST services and custom media types it makes it very easy to extract REST resource/API documentation, in real time, for the REST resources - all without having to provide any additional documentation.
2 - the schema then becomes self-validating; I can extract the example document and run it back thru the schema validator to make sure it works. And, this can be used for both positive and negative testing.
Thoughts?
Russ
Last edit: Russ Jackson 2014-07-02