A holiday present: the JSONSchema / Orderly cross compiler in ANSI C

184 views
Skip to first unread message

Lloyd Hilaiel

unread,
Dec 22, 2009, 10:44:08 PM12/22/09
to JSON Schema
Hi all,

A while ago I proposed "orderly", a small textual complement to
JSONSchema. If you recall, we were talking about a language that
could roundtrip to and from JSONSchema.

A very early, but complete, first version of that compiler is done and
you can try it out here:
http://orderly-json.org/

Though it's not documented, there's a little web services api
available too. Post JSONSchema to
http://orderly-json.org/api/orderly to convert to orderly. Or post
orderly to http://orderly-json.org/api/jsonschema to convert to
jsonschema.

Finally, the compiler is built in such a way that it can parse either
orderly or jsonschema and generate an intermediate representation.
Given that, it is my hope that very soon we'll have a robust native
(ANSI C) implementation of a JSONSchema compatible validator

All the source is available on github: http://github.com/lloyd/orderly

enjoy,
lloyd

Ganesh and Sashi Prasad

unread,
Dec 22, 2009, 11:41:17 PM12/22/09
to json-...@googlegroups.com
Thanks Lloyd, blogged.

Ganesh

2009/12/23 Lloyd Hilaiel <llo...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "JSON Schema" group.
To post to this group, send email to json-...@googlegroups.com.
To unsubscribe from this group, send email to json-schema...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/json-schema?hl=en.



LucaPita

unread,
Dec 23, 2009, 4:24:57 AM12/23/09
to JSON Schema
twitted for italian nerds http://twitter.com/lukwe/status/6959645027

On Dec 23, 5:41 am, Ganesh and Sashi Prasad <g.c.pra...@gmail.com>
wrote:
> Thanks Lloyd, blogged<http://wisdomofganesh.blogspot.com/2009/12/coming-overthrow-of-xml-or...>


> .
>
> Ganesh
>
> 2009/12/23 Lloyd Hilaiel <llo...@gmail.com>
>
>
>
> > Hi all,
>
> > A while ago I proposed "orderly", a small textual complement to
> > JSONSchema.  If you recall, we were talking about a language that
> > could roundtrip to and from JSONSchema.
>
> > A very early, but complete, first version of that compiler is done and
> > you can try it out here:
> >http://orderly-json.org/
>
> > Though it's not documented, there's a little web services api
> > available too.  Post JSONSchema to

> >http://orderly-json.org/api/orderlyto convert to orderly.  Or post
> > orderly tohttp://orderly-json.org/api/jsonschemato convert to


> > jsonschema.
>
> > Finally, the compiler is built in such a way that it can parse either
> > orderly or jsonschema and generate an intermediate representation.
> > Given that, it is my hope that very soon we'll have a robust native
> > (ANSI C) implementation of a JSONSchema compatible validator
>
> > All the source is available on github:http://github.com/lloyd/orderly
>
> > enjoy,
> > lloyd
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "JSON Schema" group.
> > To post to this group, send email to json-...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > json-schema...@googlegroups.com<json-schema%2Bunsubscribe@googlegr oups.com>

Rusco

unread,
Dec 23, 2009, 8:26:18 AM12/23/09
to JSON Schema
This looks very promising !!

But: Why do you do this in C ? I would rather prefer to have a
javascript implementation for this (better: jQuery plugin).

My 2 cents
Rusco


On Dec 23, 3:44 am, Lloyd Hilaiel <llo...@gmail.com> wrote:
> Hi all,
>
> A while ago I proposed "orderly", a small textual complement to
> JSONSchema.  If you recall, we were talking about a language that
> could roundtrip to and from JSONSchema.
>
> A very early, but complete, first version of that compiler is done and
> you can try it out here:http://orderly-json.org/
>
> Though it's not documented, there's a little web services api

> available too.  Post JSONSchema tohttp://orderly-json.org/api/orderlyto convert to orderly.  Or post
> orderly tohttp://orderly-json.org/api/jsonschemato convert to

Hatem Nassrat

unread,
Dec 23, 2009, 9:17:24 AM12/23/09
to json-...@googlegroups.com
On Wed, Dec 23, 2009 at 6:26 AM, Rusco <j.re...@gmail.com> wrote:
> This looks very promising !!
>
> But: Why do you do this in C ? I would rather prefer to have a
> javascript implementation for this (better: jQuery plugin).

Are you talking about the validator, or compiler between Orderly <->
JSON Schema. If you are talking about the compiler I would have to
disagree that it is better that it be written in JS.

How this would be used, say you already have a JSON Schema so you
would compile it once into orderly (and possibly never again), then
you would maintain the orderly version, and will compile it into JSON
Schema only to use it with the validators. Thus you would compile from
orderly to JSON Schema only when you update the document. Therefore in
my opinion any Language Choice is merely a personal preference and not
really related to the task at hand.

--
Hatem Nassrat

Lloyd Hilaiel

unread,
Dec 23, 2009, 2:24:24 PM12/23/09
to JSON Schema
Hey Rusco,

The compiler is indeed written in C. This compiler will become a full
scale validator. The benefit of this is that a single implementation
can be used in a multitude of languages.

I expect that if orderly actually proves useful we'll see a native
Javascript implementation, but there probably will be some feedback
and iteration before then.

lloyd

On Dec 23, 5:26 am, Rusco <j.reb...@gmail.com> wrote:
> This looks very promising !!
>
> But: Why do you do this in C ? I would rather prefer to have a
> javascript implementation for this (better: jQuery plugin).
>
> My 2 cents
> Rusco
>
> On Dec 23, 3:44 am, Lloyd Hilaiel <llo...@gmail.com> wrote:
>
> > Hi all,
>
> > A while ago I proposed "orderly", a small textual complement to
> > JSONSchema.  If you recall, we were talking about a language that
> > could roundtrip to and from JSONSchema.
>
> > A very early, but complete, first version of that compiler is done and
> > you can try it out here:http://orderly-json.org/
>
> > Though it's not documented, there's a little web services api

> > available too.  Post JSONSchema tohttp://orderly-json.org/api/orderlytoconvert to orderly.  Or post
> > orderly tohttp://orderly-json.org/api/jsonschematoconvert to

Reply all
Reply to author
Forward
0 new messages