JSON Schema Pre-Internet Draft

5 views
Skip to first unread message

Kris Zyp

unread,
Nov 24, 2009, 6:42:12 PM11/24/09
to restfu...@googlegroups.com
I've put together an updated JSON Schema draft in IETF RFC format. My intent is to submit this as Internet Draft to the IETF at some point. I am posting this to this list, since it includes the hyper schema definition for describing link relations in JSON data, which is intended to provide an framework for interoperable interaction with resources through JSON-based representations within a REST architecture, hopefully meeting (at least some of) the goals of this group:
http://json-schema.org/internet-drafts/draft-zyp-json-schema-00.txt

This is somewhat revised/refined definition of what I had proposed earlier for describing link relations within JSON data, but I have attempted to simplify link relation definitions to a single flexible mechanism based on a profile of URI-templates.

Thanks,

--
Kris Zyp
SitePen
(503) 806-1841
http://sitepen.com




Ernest Prabhakar

unread,
Nov 24, 2009, 7:07:21 PM11/24/09
to restfu...@googlegroups.com
> http://json-schema.org/internet-drafts/draft-zyp-json-schema-00.txt

Nice; I like it. My only request would be for additional (perhaps non-normative) examples showing how the various parameters are used in practice.

For example, I couldn't quite figure out how "{-this}" would be parsed..

-- Ernie P.

Kris Zyp

unread,
Nov 24, 2009, 7:43:14 PM11/24/09
to restfu...@googlegroups.com


Ernest Prabhakar wrote:
>> http://json-schema.org/internet-drafts/draft-zyp-json-schema-00.txt
>>
>
> Nice; I like it. My only request would be for additional (perhaps non-normative) examples showing how the various parameters are used in practice.
>
Thats a good idea, I think that would definitely help with understanding
the concepts quicker.

> For example, I couldn't quite figure out how "{-this}" would be parsed..
>
This specifically helps with a describing arrays of URI references. For
example, a schema for one of Robert Brewer's Shoji value document could
be written:
{
"type":"array",
"items":{
"type":["string", "number"],
"links":[
"href":"http://example.org/users/{-this}",
"rel": "full"
]
}
}

And then a value document like:

[387, 18843, 3478, 999, 1, 18]

Could be interpreted as a collection of links to:
http://example.org/users/387, http://example.org/users/18843, ...
Reply all
Reply to author
Forward
0 new messages