Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zaach/orderly.js
An Orderly compiler in JavaScript
https://github.com/zaach/orderly.js
Last synced: about 1 month ago
JSON representation
An Orderly compiler in JavaScript
- Host: GitHub
- URL: https://github.com/zaach/orderly.js
- Owner: zaach
- Created: 2009-12-25T18:09:52.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2013-04-17T20:46:52.000Z (over 11 years ago)
- Last Synced: 2024-09-20T02:50:52.625Z (3 months ago)
- Language: JavaScript
- Homepage: http://zaach.github.com/orderly.js/
- Size: 181 KB
- Stars: 118
- Watchers: 9
- Forks: 15
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Orderly.js
==========A CommonJS module that compiles Orderly to JSONSchema
------------------------------------------------------
> [Orderly](http://orderly-json.org/) is a textual format for describing JSON. Orderly can be compiled into JSONSchema. It is designed to be easy to read and write.Installation
----
Depends on Node.js and npm:npm install orderly -g
Module Usage
-----
var orderly = require("orderly");var orderlySource = "array {};";
var jsonSchemaSource = orderly.compile(orderlySource);
var jsonSchemaObject = orderly.parse(orderlySource);
print(JSON.stringify(jsonSchemaObject));
Command-line Usage
------
usage: orderly [options]file file to parse; otherwise uses stdin
options:
-v, --version print version and exit
-o FILE, --output-file FILE write output to the file
-t CHAR, --indent CHAR character(s) to use for indentationStandalone Usage
-----
The minified, standalone version of orderly.js is found in `web/orderly.js`. Just include it in your web page to use the `orderly` object:
var orderlySource = "array {};";
var jsonSchemaSource = orderly.compile(orderlySource);
var jsonSchemaObject = orderly.parse(orderlySource);
Orderly.js includes it's own JSON parser, but older browsers will need a JSON stringifier such as [json2.js](http://json.org/json2.js) in order to compile to JSONSchema.
License
-------
MIT X License> Copyright (c) 2009 Zachary Carter
>
> Permission is hereby granted, free of
> charge, to any person obtaining a
> copy of this software and associated
> documentation files (the "Software"),
> to deal in the Software without
> restriction, including without
> limitation the rights to use, copy,
> modify, merge, publish, distribute,
> sublicense, and/or sell copies of the
> Software, and to permit persons to
> whom the Software is furnished to do
> so, subject to the following
> conditions:
>
> The above copyright notice and this
> permission notice shall be included
> in all copies or substantial portions
> of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS",
> WITHOUT WARRANTY OF ANY KIND, EXPRESS
> OR IMPLIED, INCLUDING BUT NOT LIMITED
> TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF
> CONTRACT, TORT OR OTHERWISE, ARISING
> FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS
> IN THE SOFTWARE.