candiedyaml: github.com/cloudfoundry-incubator/candiedyaml Index | Files

package candiedyaml

import "github.com/cloudfoundry-incubator/candiedyaml"

Index

Package Files

api.go decode.go emitter.go encode.go parser.go reader.go resolver.go run_parser.go scanner.go tags.go writer.go yaml_definesh.go yaml_privateh.go yamlh.go

Constants

const (
    BOM_UTF8    = "\xef\xbb\xbf"
    BOM_UTF16LE = "\xff\xfe"
    BOM_UTF16BE = "\xfe\xff"
)

* Byte order marks.

const (
    INPUT_RAW_BUFFER_SIZE = 1024

    /*
     * The size of the input buffer.
     *
     * It should be possible to decode the whole raw buffer.
     */
    INPUT_BUFFER_SIZE = (INPUT_RAW_BUFFER_SIZE * 3)

    OUTPUT_BUFFER_SIZE = 512

    OUTPUT_RAW_BUFFER_SIZE = (OUTPUT_BUFFER_SIZE*2 + 2)

    INITIAL_STACK_SIZE = 16
    INITIAL_QUEUE_SIZE = 16
)
const MAX_NUMBER_LENGTH = 9

func Marshal Uses

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

func Run_parser Uses

func Run_parser(cmd string, args []string)

func Unmarshal Uses

func Unmarshal(data []byte, v interface{}) error

type Decoder Uses

type Decoder struct {
    // contains filtered or unexported fields
}

func NewDecoder Uses

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) Decode Uses

func (d *Decoder) Decode(v interface{}) (err error)

func (*Decoder) UseNumber Uses

func (d *Decoder) UseNumber()

type Encoder Uses

type Encoder struct {
    // contains filtered or unexported fields
}

An Encoder writes JSON objects to an output stream.

func NewEncoder Uses

func NewEncoder(w io.Writer) *Encoder

NewEncoder returns a new encoder that writes to w.

func (*Encoder) Encode Uses

func (e *Encoder) Encode(v interface{}) (err error)

type Marshaler Uses

type Marshaler interface {
    MarshalYAML() (tag string, value interface{}, err error)
}

type Number Uses

type Number string

A Number represents a JSON number literal.

func (Number) Float64 Uses

func (n Number) Float64() (float64, error)

Float64 returns the number as a float64.

func (Number) Int64 Uses

func (n Number) Int64() (int64, error)

Int64 returns the number as an int64.

func (Number) String Uses

func (n Number) String() string

String returns the literal text of the number.

type ParserError Uses

type ParserError struct {
    ErrorType   YAML_error_type_t
    Context     string
    ContextMark YAML_mark_t
    Problem     string
    ProblemMark YAML_mark_t
}

func (*ParserError) Error Uses

func (e *ParserError) Error() string

type UnexpectedEventError Uses

type UnexpectedEventError struct {
    Value     string
    EventType yaml_event_type_t
    At        YAML_mark_t
}

func (*UnexpectedEventError) Error Uses

func (e *UnexpectedEventError) Error() string

type Unmarshaler Uses

type Unmarshaler interface {
    UnmarshalYAML(tag string, value interface{}) error
}

type YAML_error_type_t Uses

type YAML_error_type_t int

* Many bad things could happen with the parser and emitter.

type YAML_mark_t Uses

type YAML_mark_t struct {
    // contains filtered or unexported fields
}

* The pointer position.

func (YAML_mark_t) String Uses

func (m YAML_mark_t) String() string

Package candiedyaml imports 16 packages (graph) and is imported by 171 packages. Updated 2018-02-16. Refresh now. Tools for package owners.