github.com/zoomfoo/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/ui/app/components/json-viewer.js (about) 1 import Component from '@ember/component'; 2 import { computed } from '@ember/object'; 3 4 export default Component.extend({ 5 classNames: ['json-viewer'], 6 7 json: null, 8 jsonStr: computed('json', function() { 9 return JSON.stringify(this.get('json'), null, 2); 10 }), 11 });