PHPackages                             scratchy/jquery-jsonview - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. scratchy/jquery-jsonview

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

scratchy/jquery-jsonview
========================

JQuery JSON viewer

1.2.3(7y ago)026.6kMITCoffeeScriptPHP ^5 || ^7

Since Aug 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/scratchy/jquery-jsonview)[ Packagist](https://packagist.org/packages/scratchy/jquery-jsonview)[ RSS](/packages/scratchy-jquery-jsonview/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

jQuery JSONView
===============

[](#jquery-jsonview)

Formats &amp; syntax highlights JSON.

Port of Ben Hollis's JSONView extension for Firefox:

[Live demo](http://yesmeck.github.io/jquery-jsonview/)

Usage
-----

[](#usage)

### Example

[](#example)

```
var json = {"hey": "guy","anumber": 243,"anobject": {"whoa": "nuts","anarray": [1,2,"three"], "more":"stuff"},"awesome": true,"bogus": false,"meaning": null, "japanese":"明日がある。", "link": "http://jsonview.com", "notLink": "http://jsonview.com is great"};

$(function() {
  $("#json").JSONView(json);
  // with options
  $("#json-collasped").JSONView(json, { collapsed: true });
});
```

### Options

[](#options)

jQuery JSONView can be configured using the following options.

- `collapsed` - Collapse all nodes when rendering first time, default is `false`.
- `nl2br` - Convert new line to `` in String, default is `false`.
- `recursive_collapser` - Collapse nodes recursively, default is `false`.
- `escape` - Escape HTML in key, default is `true`.
- `strict` - In strict mode, invalid JSON value type will throw a error, default is `false`.

### API

[](#api)

jQuery JSONView provide following methods to allow you control JSON nodes, all methods below accept a level argument to perform action on the specify node.

- `jQuery#JSONView('collapse', [level])` - Collapse nodes.
- `jQuery#JSONView('expand', [level])` - Expand nodes.
- `jQuery#JSONView('toggle', [level])` - Toggle nodes.

Licence
-------

[](#licence)

[MIT](http://opensource.org/licenses/MIT)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 83.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2816d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9082e069db94a6b8110a04910f6b62b640e60a7e4a977bf6eccc3b88a494fe6?d=identicon)[scratchy2](/maintainers/scratchy2)

---

Top Contributors

[![yesmeck](https://avatars.githubusercontent.com/u/465125?v=4)](https://github.com/yesmeck "yesmeck (71 commits)")[![Ovilia](https://avatars.githubusercontent.com/u/779050?v=4)](https://github.com/Ovilia "Ovilia (3 commits)")[![elbshry](https://avatars.githubusercontent.com/u/16527954?v=4)](https://github.com/elbshry "elbshry (2 commits)")[![hyandell](https://avatars.githubusercontent.com/u/477715?v=4)](https://github.com/hyandell "hyandell (2 commits)")[![scratchy](https://avatars.githubusercontent.com/u/906544?v=4)](https://github.com/scratchy "scratchy (2 commits)")[![aartek](https://avatars.githubusercontent.com/u/5053151?v=4)](https://github.com/aartek "aartek (1 commits)")[![adamtootle](https://avatars.githubusercontent.com/u/129963?v=4)](https://github.com/adamtootle "adamtootle (1 commits)")[![tenbits](https://avatars.githubusercontent.com/u/550353?v=4)](https://github.com/tenbits "tenbits (1 commits)")[![XiyanHu](https://avatars.githubusercontent.com/u/22786769?v=4)](https://github.com/XiyanHu "XiyanHu (1 commits)")[![ohadperry](https://avatars.githubusercontent.com/u/2236337?v=4)](https://github.com/ohadperry "ohadperry (1 commits)")

### Embed Badge

![Health badge](/badges/scratchy-jquery-jsonview/health.svg)

```
[![Health](https://phpackages.com/badges/scratchy-jquery-jsonview/health.svg)](https://phpackages.com/packages/scratchy-jquery-jsonview)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
