JSON Formatter
JSON Formatter is an AngularJS directive for rendering JSON objects in HTML with a collapsible navigation.
Usage
-
Install via Bower
bower install json-formatter --save
-
Add
jsonFormatter
to your app dependenciesangular .module('jsonFormatterApp', [ 'ngCookies', ... 'jsonFormatter' ])
-
Use
<json-formatter>
directive<json-formatter json="{my: 'json'}" open="1"></json-formatter>
-
open
attribute accepts a number which indicates how many levels rendered JSON should be opened
Demo
See Examples here
Browser Support
All modern browsers are supported. Lowest supported version of Internet Explorer is IE9.
License
Apache 2.0
See LICENSE