...

Package colorjson

import "github.com/TylerBrock/colorjson"
Overview
Index
Subdirectories

Overview ▾

func Marshal

func Marshal(jsonObj interface{}) ([]byte, error)

Marshal JSON data with default options

type Formatter

type Formatter struct {
    KeyColor        *color.Color
    StringColor     *color.Color
    BoolColor       *color.Color
    NumberColor     *color.Color
    NullColor       *color.Color
    StringMaxLength int
    Indent          int
    DisabledColor   bool
    RawStrings      bool
}

func NewFormatter

func NewFormatter() *Formatter

func (*Formatter) Marshal

func (f *Formatter) Marshal(jsonObj interface{}) ([]byte, error)

Subdirectories

Name Synopsis
..
examples