https://github.com/mohsen1/json-schema-view
An AngularJS directive for rendering JSON Schema in HTML
https://github.com/mohsen1/json-schema-view
Last synced: 10 months ago
JSON representation
An AngularJS directive for rendering JSON Schema in HTML
- Host: GitHub
- URL: https://github.com/mohsen1/json-schema-view
- Owner: mohsen1
- Created: 2014-10-06T23:56:46.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-13T19:03:46.000Z (almost 9 years ago)
- Last Synced: 2024-04-14T14:51:09.318Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://azimi.me/json-schema-view/demo/demo.html
- Size: 1.07 MB
- Stars: 49
- Watchers: 4
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-json - JSON Schema View - An AngularJS directive for rendering JSON Schema in HTML (AngularJS) (JSON Schema Frontend components)
README
# JSON Schema View
[](https://travis-ci.org/mohsen1/json-schema-view)
**An AngularJS directive for rendering JSON Schema in HTML.**
JSON Schema is very verbose and hard to read in JSON. This directive helps rendering a JSON Schema in a user readable format.
The same module is also available in pure JavaScript with no dependencies. **Check it out [here](https://github.com/mohsen1/json-schema-view-js)**
[Try it in action](http://azimi.me/json-schema-view/demo/demo.html)
[](http://mohsenweb.com/json-schema-view/demo/demo.html)
### Installation
Install via bower
```shell
bower install json-schema-view --save
```
### Usage
Add it as a dependency to your app and then use `` in your HTML as following
```js
angular.module('myApp', ['...', 'mohsen1.json-schema-view']);
```
```html
```
* **`schema`**(**required**) attribute will accepts a schema object
* **`open`** attribute accepts a number that indicates how many levels deep the schema should be open
### Development
Install Gulp via npm if you don't have it
```shell
npm install -g gulp
```
#### Available commands
* `gulp`: build and test the project
* `gulp build`: build the project and make new files in`dist`
* `gulp serve`: start a server to serve the demo page and launch a browser then watches for changes in `src` files to reload the page. It also runs tests and keep test browser open for development. Watches for changes in source and test files to re-run the tests
* `gulp test`: run tests
### License
MIT