convert

package
v0.0.0-...-737bdf4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoding

type Encoding interface {
	String() string
	Encode(w io.Writer, in interface{}) error
	Decode(r io.Reader) (interface{}, error)
}

type HCL

type HCL struct{}

func (HCL) Decode

func (HCL) Decode(r io.Reader) (interface{}, error)

func (HCL) Encode

func (HCL) Encode(w io.Writer, in interface{}) error

func (HCL) String

func (HCL) String() string

type JSON

type JSON struct {
	EscapeHTML bool
	Indent     bool
}

func (JSON) Decode

func (JSON) Decode(r io.Reader) (interface{}, error)

TODO: implement streaming version

func (JSON) Encode

func (j JSON) Encode(w io.Writer, in interface{}) error

func (JSON) String

func (JSON) String() string

type SpecialFloats

type SpecialFloats int
const (
	FloatsReal SpecialFloats = iota
	FloatsString
	FloatsNumber
)

func (SpecialFloats) NaN

func (s SpecialFloats) NaN() interface{}

func (SpecialFloats) NegInf

func (s SpecialFloats) NegInf() interface{}

func (SpecialFloats) PosInf

func (s SpecialFloats) PosInf() interface{}

type TOML

type TOML struct {
	SpecialFloats
	Indent bool
}

func (TOML) Decode

func (t TOML) Decode(r io.Reader) (interface{}, error)

func (TOML) Encode

func (t TOML) Encode(w io.Writer, in interface{}) error

func (TOML) String

func (TOML) String() string

type YAML

type YAML struct {
	SpecialFloats
	KeySpecialFloats SpecialFloats
	JSONKeys         bool
	EscapeHTML       bool
}

func (YAML) Decode

func (y YAML) Decode(r io.Reader) (interface{}, error)

func (YAML) Encode

func (y YAML) Encode(w io.Writer, in interface{}) error

func (YAML) String

func (YAML) String() string

Jump to

Keyboard shortcuts

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