Struct json_color::Colorizer [] [src]

pub struct Colorizer {
    pub null: Color,
    pub boolean: Color,
    pub number: Color,
    pub string: Color,
    pub key: Color,
}

A struct representing a specific configuration of colors for the various JSON components.

Fields

Methods

impl Colorizer
[src]

Start builder a new Colorizer.

Creates a new Colorizer with a predefined set of colors for the various JSON components.

Use this if you want your JSON to be colored, but don't care about the specific colors.

Colorize a JSON string. Currently, all strings will be pretty-printed (with indentation and spacing).

Errors

An error is returned if the string is invalid JSON or an I/O error occurs.

Trait Implementations

impl Default for Colorizer
[src]

Returns the "default value" for a type. Read more