Skip to content

gandaro/pygments-json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pygments-json

Pygments is a syntax highlighting tool that supports a wide range of languages and data formats. However, pygments does not provide a JSON highlighter. JSON can, of course, be parsed by the Javascript lexer, but the resulting output looks very plain and provides limited value over non-highlighted text.

pygments-json attempts to provide more interesting syntax highlighting which correctly distinguishes between attribute names and values. I'm new to pygments and to python packaging, so please don't hesitate to tell me if I've done something wrong or if the JSON parsing doesn't quite work for you.

The pygments-json JSONLexer has been submitted to the Pygments project for inclusion in an upcoming release.

Install

$ pip install pygments-json

Usage

Pygment json highlighting is available without any further customization from code as well as from the pygementize command:

$ pygmentize your-file.json

... beautifully formatted json will flow here

Norman Richards

orb@nostacktrace.com

About

Better JSON highlighting for pygments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%