new javascript library to create forms from json schema

493 views
Skip to first unread message

Stefan Meyer

unread,
Jun 5, 2013, 3:22:19 AM6/5/13
to json-...@googlegroups.com
Hi,

I created the gform library. It makes it really easy to create complex forms and bind them to javascript objects. It's based on dojo. The form can be generated based on json schema (v0.3). In fact json schema is first converted to gform schema and then the form is created. gform schema rather describes classes from statically typed languages and has a type property. While gform schema is far from perfect I think it has some advantages over json schema when it comes to form generation:

- meta data can be added to properties in gform schema. In json schema the property is only the key of the "properties" object and it is hard to add extra information to it.
- When the user creates an object he usually chooses from one of several possible types. While it is possible to create such a list in json schema, I think it is hard to figure out the type of a given instance. In gform schema the type property's value is the name of the type.


Check it out www.toobop.net/gform

Best,
Stefan

Geraint

unread,
Jun 5, 2013, 2:03:31 PM6/5/13
to json-...@googlegroups.com
Cool. :)  Always good to have more JSON Schema -based UI generation.

1) There's no reason you can't add similar meta-data to the schemas in "properties", is there?  If you want to express something not covered in the core standard, you can use a keyword specific to your situation.
2) Are you talking about "oneOf"?  Which bits are difficult?
Reply all
Reply to author
Forward
0 new messages