json2form
is a ruby library and executable to convert valid JSON objects to
HTML forms. json2form
is also available as a rubygem for quick installation.
Add this line to your application's Gemfile:
gem "json2form"
And then execute:
$ bundle
Or install it yourself as:
$ gem install json2form
If you've installed the gem, json2form
is available as a cli command, which can be used as following:
$ cat some.json | json2form # outputs table
require 'json2form'
form_options = { convert_to: :haml } # options: [:haml, :html, :slim]
json = STDIN.read
json2form = Json2form.get_html_form(json, form_options)
puts json2form
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.