# json-browse

> jQuery plugin to easily browse and highlight your JSON

Latest version **0.2.0** (published 2016-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install json-browse
pnpm add json-browse
yarn add json-browse
bun add json-browse
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-08-30 |
| First published | 2016-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Kevin Olson |
| Maintainers | acidjazz |
| Keywords | jquery-plugin, json, json-viewer, json-browse, json2html |

## Links

- npm: https://www.npmjs.com/package/json-browse
- Repository: https://github.com/acidjazz/json-browse
- Issues: https://github.com/acidjazz/json-browse/issues
- npm.io page: https://npm.io/package/json-browse

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.2.0 (latest) — 2016-08-30

## README

# json-browse

![](example3.jpg)

*json-browse* is a jQuery plugin to easily browse and highlight your JSON.

* Syntax highlighting
* Collapse and expand child nodes on click
* Clickable links
* Easily readable and minimal DOM structure

[demo page](http://rawgit.com/acidjazz/json-browse/master/demo.html)!

## Usage

Import `jquery.json-browse.js` and `jquery.json-browse.css` in your application.

Then just call the `jsonBrowse()` method passing in an object:

```html
<pre id="json-renderer" class="json-body"></pre>
```

```js
var data = {
  "foobar": "foobaz"
};
$('#json-renderer').jsonBrowse(data);
```

## Options

The `jsonBrowse` method accepts an optional `options` hash as a second argument:

| Option     |   Type  | Default | Description                                              |
|------------|:-------:|--------:|----------------------------------------------------------|
| collapsed  | boolean |   false | All nodes are collapsed.                                 |
| withQuotes | boolean |   false | All JSON keys are surrounded with double quotation marks |

Example:

```js
$('#json-renderer').jsonBrowse(data, {collapsed: true, withQuotes: true});
```

---
_Source: https://npm.io/package/json-browse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
