JSONwidget
An automatic form generator/editor for JSON in Javascript
News:
- 2005-12-01 -
JSONwidget 0.1.0 release. Current version has only been
tested with Firefox 1.0.7. Known to be very buggy in IE and
Opera, if it works at all. (Heck, it's pretty buggy in Firefox,
still). Future versions will have much more testing in other browsers.
About
JSONwidget is a Javascript library implementing a basic HTML form
interface for editing arbitrary JSON files. Application designers
using this library have the option of providing a schema, limiting the
input to a subset of valid JSON compatible with whatever application is
actually consuming the JSON, or using a provided permissive schema that
allows any valid JSON. The form is dynamically generated using
nothing more than a schema and a JSON file as input.
The library is licensed under a BSD-style license, making the licensing very flexible for many different applications.
Demos
Note: these demos only work well in Firefox (as of this writing on 2005-12-01):
Other demos are available via selection box at the bottom of the examples above.
Acknowledgements
This assembles a lot of code and ideas from other sources.
- json.js - a modified, outdated version of Douglas Crockford's library
, which allows for nicely formated JSON. My apologies to Mr.
Crockford for the butchered, forked version - I plan to work on a
cleaner patch for later submission.
- Schema language inspired by and mostly compatible with the JSON version of Kwalify by Makoto Kuwata.
- JSON.php by Michal Migurski and others. This is provided as originally distributed.
- I'm certain there are others.
Download
A tarball with everything used to create this demo is below:
Copyright (c) 2005 Rob Lanphier