Skip to content

YieldRay/simple-json-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-json-viewer

A simple web component to display json data

Usage

Plain HTML

<script type="module" src="https://unpkg.com/simple-json-viewer"></script>

<json-viewer data='{"some": "json", "array": [0, true, "2"] }'></json-viewer>

With Javascript

import "https://unpkg.com/simple-json-viewer";

const jv = document.createElement("json-viewer");
// data can be any javascript variable that can stringify to json
jv.data = { some: "json", array: [0, true, "2"] };
document.body.append(jv);

// can also expand all or collapse all
jv.expandAll();
jv.collapseAll();

About

A simple web component to display json data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published