Wednesday, December 23rd, 2009
Orderly JSON
Lloyd Hilaiel of Yahoo! BrowserPlus fame, has a little holiday gift for us. He has created a simple library called Orderly that "is a textual format for describing JSON. Orderly can be compiled into JSONSchema. It is designed to be easy to read and write."
He shares:
A little bit of orderly...
JAVASCRIPT:
object { string name; string description?; string homepage /^http:/; integer {1500,3000} invented; }*;...describes a little bit of JSON...
JAVASCRIPT:
{ "name": "orderly", "description": "A schema language for JSON", "homepage": "http://orderly-json.org", "invented": 2009 }...and compiles into JSONSchema.
JAVASCRIPT:
{ "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string", "optional": true }, "homepage": { "type": "string", "pattern": "^http:" }, "invented": { "type": "integer", "minimum": 1500, "maximum": 3000 } }, "additionalProperties": true }Go into detail on Orderly in the documentation or try the
interactive by-directional Orderly - JSONSchema area.












looks cool, but what happens after the year 3000?!
So it’s basically the old ascii plist format?
I just hope by the year 3000, we have something better than HTML + JS, heh.
Why in the `homepage` is the rule-set after the name, but in the following line the rule-set is before the name?
It should be noted, that this is not done in JavaScript. Its a C code thingy.
I recently started to use JSONSchema to describe and validate API-fields (salesking.eu). I have read all the post about orderly here and considered it too, but it did not make much sense for me to use it.
Why?
The syntax is, in my view, not so easy to read and to parse like a plain json. Orderly say it dismisses some schema properties, but actually you don’t need to use those anyway. And where is the sense of compiling it back to json so others can interpret it?
I am using ruby on the server side and will publish an api-helper gem which contains the schema. This can be easily used in other languages(php/js/java) without the need to reparse. So as with xml, json gives you nice decoupling from the language, which is more important than writing less description-code.
You can try propagating Orderly further, but i think it will not be the big shoot everybody is waiting for.
@bluevoodoo1 by the year 3000 everything there is to invent will already be thought up?
@d4rkl1gh7 nice analogy. It’s also been likened to RelaxNG’s compact syntax (which was a latent influencer). I hope that everyone can compare it to something, then go guess the syntax.
@Aimos An initial primary motivation of orderly was to be able to document web apis in a clearer and more rigorous way (currently most people just post example output). From the likes of it, it sounds like you feel even that should be left to an example instance document (in which case the reader intuits the “schema” based on this single instance) or with jsonschema. If you feel this way, well, you might have sunk my battleship. I’ll have to think up a different holiday present for you. Do you like legos?
PLEASE let JSON as simple as it is. If you need to specify type, comment, etc. and if you need to validate with a schema you can use XML.
There is no need to make a thing so simple and clear to something than already exist (and that nobody want to use).
I couldn’t agree more with fpiat – why cock up something that works so well due to its minimalistic flexibility?
@fpiat & sixtyseconds,
Erm… You do realize this is optional right? Not an addition to the JSON spec… Ergo, JSON stays simple…
.
This is just a tool for programmers that need to build well tested, well formed, robust and safe applications.
Not that long ago Ed Hardy in a galaxy not that far away Ed Hardy Clothing we released an update Links London jewellery to Pharos IV Assault Ed Hardy Clothing sale This updates unleashes computer Cheap Ed Hardy Clothing assisted torpedo targeting Ed Hardy Clothing Sale for greater accuracy Cheap Ed Hardy resumption from highest level attained Links London no more starting over from level Ed Hardy Sale and fixed the stutter Discount Ed Hardy Clothing issue that affected iPhone Cheap Tiffany users Update is Tiffany and co for both iPhone Cheap Tiffany Jewelry Bartow Florida Cheap Tiffany and co After more than Links of London jewellery three decades in prison Tiffany and co UK a Florida man was set free Tiffany and co Jewelry Thursday after a DNA test showed he did not kidnap and rape a Tiffany and co sale year-old boy in 1974 Cheap Links of London jewellery I m not angry James Bain Tiffany told reporters after a brief hearing in Bartow Florida Tiffany Co Bain was 19 when he was convicted Tiffany sale on charges of kidnapping Links of London burglary and strong-arm rape Links of London jewelry He received a life sentence cheap Links of London He s going home for the Tiffany Jewelry first time in 35 years Links of London sale I got God in my head Tiffanys said Bain Tiffany Jewellery surrounded by supporters and wearing a Links of London UK T shirt with Not Guilty Tiffany UK across the front Discount Links of London .
Buy Kamagra Earn Google M65 Jacket Viagra Cialis Cheap Kamagra Cheap Viagra Cheap Cialis Make Money on Google M65 Field Jacket Airline Dog Carrier Airline Dog Carriers Viagra Cialis Earn Google Airline Dog Carrier Airline Dog Carriers Airline Approved Dog Carriers ED Hardy Wholesale Copy DVD Software How to Send Fax 14k Yellow Gold Redneck Costume 14k Gold Heart Tandem Baby Stroller
Pass4sure, a professional training website in IT certification exam, is designed for IT candidates who want to pass any IT exams. With its high quality products and 24*7 considerable services, Pass4sure has strengthened its leading position in this field, and attracted many famous vendors like Cisco, Microsoft, IBM, Sun, compTIA, HP, etc.The Most Popular exams List :642-845646-656 BH0-004 HP0-D04 350-018 CISSP JN0-342 132-S-900.7 642-971 642-373 642-524 310-200642-973 642-691 HP0-S20 220-702 642-145 650-621 642-436 642-975 1Y0-A08 156-315.65 640-802 Click Pass For Sure to get more information!