• This repository has been archived on 18/Jan/2022
  • Stars
    star
    488
  • Rank 89,605 (Top 2 %)
  • Language
    CoffeeScript
  • Created over 11 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[UNMAINTAINED]View JSON in a more readable format

jQuery JSONView

Formats & syntax highlights JSON.

Port of Ben Hollis's JSONView extension for Firefox: http://jsonview.com

Live demo

Usage

Example

var json = {"hey": "guy","anumber": 243,"anobject": {"whoa": "nuts","anarray": [1,2,"thr<h1>ee"], "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

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 <br> 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

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

MIT

More Repositories

1

waque

[不再维护]同步本地 Markdown 文档到语雀
TypeScript
244
star
2

remix-routes

Typesafe routing for your Remix apps.
TypeScript
206
star
3

reactive.macro

Reduce the React boilerplate.
TypeScript
172
star
4

react-with-hooks

[OUTDATED]Ponyfill for the React Hooks API (Support RN)
JavaScript
152
star
5

redux-modal

Redux based modal
TypeScript
105
star
6

mini-store

A minimal state store for React component.
TypeScript
100
star
7

vs-codesandbox

Bring CodeSandbox into your favorite editor
TypeScript
81
star
8

camas

Minimal React authorization library
TypeScript
66
star
9

tmuxrc

My configuration for tmux.
Shell
65
star
10

webpack-less-theme-plugin

Inject less variables to your less file. Support HMR.
JavaScript
26
star
11

styled-antd

Proof of concept using styled-components with antd
JavaScript
25
star
12

react-context-io

Share state with ease.
TypeScript
22
star
13

hexdocset

Convert hex doc to Dash.app's docset format.
Elixir
21
star
14

babel-plugin-reactive

Make React Reactive Again!
TypeScript
18
star
15

rx-hackernews

HackerNews clone built with React/Redux/redux-observable.
JavaScript
17
star
16

dotbox

Backup your dotfiles to dropbox and restore them easily.
Ruby
10
star
17

antd.macro

A babel macro that helps you import antd's style.
TypeScript
9
star
18

antd-rtl

antd rtl demo
CSS
6
star
19

star

下载豆瓣红心歌曲
Ruby
6
star
20

toby

Ruby 版淘宝 API SDK
Ruby
6
star
21

redux-polymorphic

Reuse your reduers
JavaScript
5
star
22

umi-routes-drawer

TypeScript
5
star
23

yesmeck

5
star
24

HelloSketch

Swift
4
star
25

douban_fm_hotkey

Douban FM 全局快捷键
JavaScript
4
star
26

react-full-viewport

A React component that sets its children to full viewport.
TypeScript
4
star
27

antd-dash

JavaScript
3
star
28

neotable

JavaScript
3
star
29

formsy-react-inputs

A set of formsy-react inputs without any fancy.
JavaScript
3
star
30

git-phpcs-hooks

Shell
2
star
31

github-comment-webhook

Ruby
2
star
32

vim-tips.org

The source for vim-tips.org.
Ruby
2
star
33

is-test

Next.js template for CodeSandbox Projects
TypeScript
2
star
34

monkey-lang

A Monkey implementation in Rust for learning purpose.
Rust
2
star
35

bookmarklets

Chrome bookmarklet extension
JavaScript
2
star
36

babel-preset-antd

JavaScript
2
star
37

git-graph

Graph git commits.
CSS
1
star
38

tree-transfer

JavaScript
1
star
39

react-vue-antd-demo

JavaScript
1
star
40

babel-spread-undefined

JavaScript
1
star
41

huami.ex

A CLI version of flower password writing in Elixir.
Elixir
1
star
42

enzyme-set-props-bug

JavaScript
1
star
43

hello-codesandbox-projects

Remix template for CodeSandbox Projects
TypeScript
1
star
44

bug-24

JavaScript
1
star
45

antd-enzyme

[DEPRECATED]
JavaScript
1
star
46

hello-form-ios

Next.js template for CodeSandbox Projects
TypeScript
1
star
47

vimrc

My very personal vimrc
Vim Script
1
star
48

Sublime-IDE

My configuration for using Sublime Text as an IDE.
Python
1
star
49

huami.rb

A CLI version of flower password.
Ruby
1
star
50

hubot-tianqi

Hubot 天气查询
CoffeeScript
1
star
51

raycast-extensions

My Raycast extensions
TypeScript
1
star
52

hubot-xiexie

A hubot script that accepts your 谢谢
CoffeeScript
1
star
53

remax-suspense-demo

JavaScript
1
star
54

github-slideshow

A robot powered training repository 🤖
HTML
1
star
55

react-oom

JavaScript
1
star
56

babel-plugin-resolve-es6-module

JavaScript
1
star
57

tips.vim

Show vim tips everytime when you enter vim.
Vim Script
1
star