json_format

package
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DarkStyle = Style{
	Null:    "\033[38;5;47m",
	Boolean: "\033[38;5;45m",
	Numeric: "\033[38;5;141m",
	String:  "\033[38;5;228m",
	Key:     "\033[1m\033[38;5;197m",
	Generic: "\033[0m",
}
View Source
var LightStyle = Style{
	Null:    "\033[38;5;19m",
	Boolean: "\033[38;5;18m",
	Numeric: "\033[38;5;55m",
	String:  "\033[38;5;22m",
	Key:     "\033[1m\033[38;5;52m",
	Generic: "\033[0m",
}

Functions

func PrettyPrintJSON

func PrettyPrintJSON(obj map[string]interface{}, indent int, style *Style) string

Types

type Style

type Style struct {
	Null    string `json:"null"`
	Boolean string `json:"boolean"`
	Numeric string `json:"numeric"`
	String  string `json:"string"`
	Key     string `json:"key"`
	Generic string `json:"generic"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL