{ "view json": "native v1 web component", "css variables": ["--background-color","--color","--string-color","--number-color","--boolean-color","--null-color","--key-color"], "attributes": ["inline","no-scroll","no-parse"], "dependencies": null,"lines of code":64 }

Changes to innerHTML of component are refreshed live

Only valid JSON is accepted or you will get something like {

Inline stuff with the inlineattribute

To turn off parsing (acts just like a <‍pre>), add the no-parseattribute

Colors can be overwriden via css vars:view-json { --background-color: #333; --color: #ddd; --string-color: #2d2; --number-color: pink; --boolean-color: orange; --null-color: grey; --key-color: magenta; }

github