Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wutility/json-viewer

🔥 Ultra Fast and lightweight Json Viewer and formatter <3KB with 0 Dependencies
https://github.com/wutility/json-viewer

browser formatter json json-formatter json-viewer

Last synced: about 1 month ago
JSON representation

🔥 Ultra Fast and lightweight Json Viewer and formatter <3KB with 0 Dependencies

Awesome Lists containing this project

README

        


json viewer



json viewer
json viewer
json viewer
json viewer
json viewer

### Demos
[PLayground](https://wutility.github.io/json-viewer)
[Demo Codepen](https://codepen.io/haikelfazzani-the-bold/pen/bGWKEMP)

```bash
$ npm i jsnview
# or
$ yarn add jsnview
```

## Usage
```js
import jsnview from 'jsnview';
import 'jsnview/build/index.css';
```

Or include it via jsDelivr CDN (UMD):
```html

```

### Methods && Examples
- **jsnview(data: Object, options: Object): [HTMLElement]**
```js
// Default options
const options = {
showLen: false,
showType: false,
showBrackets: true,
showFoldmarker: false,
colors: { boolean: '#ff2929', null: '#ff2929', string: '#690', number: '#905', float: '#002f99' }
}

let data = { name: 'Mike', age: 22 };
const treeView = jsnview(data, options); // returns HTMLElement
document.body.appendChild(treeView);
```

### Notes
- All pull requests are welcome, feel free.

### Author
- [Haikel Fazzani](https://github.com/haikelfazzani)

## License
Apache License 2.0