Skip to content
/ jsonhl Public

Go library to colorize json output of terminal applications

License

Notifications You must be signed in to change notification settings

dawi/jsonhl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonhl

Go library to colorize JSON output of terminal applications.

Features

  • small and focused
  • colorizes JSON output without changing the JSON formatting

Usage

Using io.Reader and io.Writer:

jsonhl.Highlight(os.Stdin, os.Stdout)
jsonhl.HighlightC(os.Stdin, os.Stdout, jsonhl.DefaultColors)

Using strings:

fmt.Println(jsonhl.HighlightString(`{ "hello" : "world" }`))
fmt.Println(jsonhl.HighlightStringC(`{ "hello" : "world" }`, jsonhl.DefaultColors))

About

Go library to colorize json output of terminal applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages