https://github.com/addepar/ember-json-viewer
An Ember Addon that adds a json-viewer component for showing collapsible/expandable json.
https://github.com/addepar/ember-json-viewer
ember ember-addon
Last synced: 2 months ago
JSON representation
An Ember Addon that adds a json-viewer component for showing collapsible/expandable json.
- Host: GitHub
- URL: https://github.com/addepar/ember-json-viewer
- Owner: Addepar
- License: mit
- Created: 2020-12-08T20:02:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-03T19:31:09.000Z (about 1 year ago)
- Last Synced: 2025-04-03T20:23:08.441Z (about 1 year ago)
- Topics: ember, ember-addon
- Language: JavaScript
- Homepage: https://addepar.github.io/ember-json-viewer
- Size: 4.8 MB
- Stars: 3
- Watchers: 54
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ember-json-viewer
Ember addon that exposes a component `{{json-viewer}}`.
Pass it a JSON object (not string) as `json`: `{{json-viewer json=this.jsonValue}}`.
Demo: http://addepar.github.io/ember-json-viewer

## Compatibility
- tested with Ember.js v3.28 and Ember 4.x LTS versions
- tested with Node.js v22, should work with any modern Node version
- Requires your app to have ember-auto-import >= 2
## Installation
```
ember install ember-json-viewer
```
## Options
You can use options by passing in an object (or hash) with the following keys:
```html.handlebars
```
### `expandedIcon`
The string prepended to a key when that particular key value is expanded.
### `collapsedIcon`
The string prepended to a key when that particular key value is collapsed.
### `collapseDepth`
This sets the initial level of expanded items. `collapseDepth=0` will have all properties collapsed completely. `collapseDepth=1` will expand the first level of keys.
## Contributing
See the [Contributing](CONTRIBUTING.md) guide for details.
## Deploy Demo to Github Pages
`npm run deploy`
## License
This project is licensed under the [MIT License](LICENSE.md).