JavaScript JSON viewer plugin. Requires jQuery.
Download the latest release, or install using Bower:
bower install --save jsonpanel
Include in page
<link rel="stylesheet" type="text/css" href="https://github.com/afeld/jsonpanel/blob/gh-pages/bower_components/jsonpanel/stylesheets/jsonpanel.css">
<script src="https://github.com/afeld/jsonpanel/raw/gh-pages/bower_components/jquery/dist/jquery.js"></script>
<script src="https://github.com/afeld/jsonpanel/raw/gh-pages/bower_components/Autolinker.js/dist/Autolinker.js"></script>
<script src="https://github.com/afeld/jsonpanel/raw/gh-pages/bower_components/jsonpanel/jsonpanel.js"></script>
<!-- ... -->
<div class="jsonpanel"></div>
Initialize by passing JSON object into jQuery plugin:
$(document).ready(function(){
$('.jsonpanel').jsonpanel({
data: {
sample: 'json'
}
});
});
See the demo page, or api.afeld.me for a real-world example.
gem install bundler
bundle
bundle exec compass watch
open index.html
bundle exec rackup
open "http://localhost:9292/index.html?coverage=true"