krishna-acondy / json-syntax-highlighting

Syntax highlighting for JSON

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

json-syntax-highlighting

Syntax highlighting for JSON

A simple function that generates syntax-highlighted HTML markup from JSON.

How to use

  1. Call syntaxHighlight() with your JSON object as an argument.
  2. Set the resulting string as the innerHTML on the element where you want to display it.
  3. Customize the colors in CSS using the classes .string, .number, .boolean, .null and .key.

screenshot

About

Syntax highlighting for JSON


Languages

Language:HTML 62.8%Language:JavaScript 27.1%Language:CSS 10.1%