Fair warning, the code "just works" - it could use a good refactoring. Pull requests welcome. The JSV was built to support a specific use case, so support for JSON schema(draft v4) keywords are added on an as-needed basis. You may also notice a few extensions to the spec, e.g. example, translation, version, deprecated, etc.
JSDocs are here
- Clone repository:
git clone email@example.com:jlblcc/json-schema-viewer.git
- Enter project directory:
- Install dependencies via Bower:
- Install dependencies via NPM:
- Build project via Grunt:
grunt dev: Development build. This will create dev.html and basic.html in the project root(these files are .gitignored). This build will load all unminified js files individually.
grunt prod: Production build. This will create a production version at ./prod/<%= pkg.version %>/<%= now %>/<%= ver %>. The production version includes concatenated and minified js/css. Note: jQuery/JQuery Mobile are not included in the js builds. The prod directory is also .gitignored.
- Serve with your favorite web server:
grunt connect:server:keepaliveto start a basic server at http://localhost:9001
- example basic nginx config
python -m SimpleHTTPServer 9001
- php 5.4+:
php -S localhost:9001
Edit the templates to modify layout:
- index.html: jQuery Mobile interface. Copied to /dev.html on
- basic.html: a basic example without jQuery Mobile or Sass dependency(css
- latest.html: redirects to the last production build. Copied to /index.html on
See [Gruntfile.js] (https://github.com/jlblcc/json-schema-viewer/blob/master/Gruntfile.js) or
for details on the available Grunt tasks.
grunt --help will also list available
This project was inspired by robschmuecker’s block #7880033.