Home

Awesome

JSON Formatter

Build Status Code Climate

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

Screebshot

Now also available in pure JavaScript with zero dependency!

Usage

Configuration

You can use JSONFormatterConfig provider to configure JOSN Formatter.

Available configurations

Hover Preview

Example using configuration

app.config(function (JSONFormatterConfigProvider) {

  // Enable the hover preview feature
  JSONFormatterConfigProvider.hoverPreviewEnabled = true;
});

Demo

See Examples here

Known Bugs

hashKey

If you are iterating in an array of objects using ng-repeat, make sure you are using track by $index to avoid adding extra $$hashKey to your objects.

Browser Support

All modern browsers are supported. Lowest supported version of Internet Explorer is IE9.

License

Apache 2.0

See LICENSE