/json-formatter

Angular directive for collapsible JSON in HTML

Primary LanguageJavaScriptOtherNOASSERTION

JSON Formatter

Build Status

JSON Formatter is an AngularJS directive for rendering JSON objects in HTML with a collapsible navigation.

Screebshot

Usage

  • Install via Bower

    bower install json-formatter --save
  • Add jsonFormatter to your app dependencies

    angular
    .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