kubernetes/vendor/gopkg.in/square/go-jose.v2/json/stream.go

type Decoder

// NewDecoder returns a new decoder that reads from r.
//
// The decoder introduces its own buffering and may
// read data from r beyond the JSON values requested.
func NewDecoder(r io.Reader) *Decoder {}

// Deprecated: Use `SetNumberType` instead
// UseNumber causes the Decoder to unmarshal a number into an interface{} as a
// Number instead of as a float64.
func (dec *Decoder) UseNumber() {}

// SetNumberType causes the Decoder to unmarshal a number into an interface{} as a
// Number, float64 or int64 depending on `t` enum value.
func (dec *Decoder) SetNumberType(t NumberUnmarshalType) {}

// Decode reads the next JSON-encoded value from its
// input and stores it in the value pointed to by v.
//
// See the documentation for Unmarshal for details about
// the conversion of JSON into a Go value.
func (dec *Decoder) Decode(v interface{}

// Buffered returns a reader of the data remaining in the Decoder's
// buffer. The reader is valid until the next call to Decode.
func (dec *Decoder) Buffered() io.Reader {}

// readValue reads a JSON value into dec.buf.
// It returns the length of the encoding.
func (dec *Decoder) readValue() (int, error) {}

func (dec *Decoder) refill() error {}

func nonSpace(b []byte) bool {}

type Encoder

// NewEncoder returns a new encoder that writes to w.
func NewEncoder(w io.Writer) *Encoder {}

// Encode writes the JSON encoding of v to the stream,
// followed by a newline character.
//
// See the documentation for Marshal for details about the
// conversion of Go values to JSON.
func (enc *Encoder) Encode(v interface{}

type RawMessage

// MarshalJSON returns *m as the JSON encoding of m.
func (m *RawMessage) MarshalJSON() ([]byte, error) {}

// UnmarshalJSON sets *m to a copy of data.
func (m *RawMessage) UnmarshalJSON(data []byte) error {}

var _

var _

type Token

const tokenTopValue

const tokenArrayStart

const tokenArrayValue

const tokenArrayComma

const tokenObjectStart

const tokenObjectKey

const tokenObjectColon

const tokenObjectValue

const tokenObjectComma

// advance tokenstate from a separator state to a value state
func (dec *Decoder) tokenPrepareForDecode() error {}

func (dec *Decoder) tokenValueAllowed() bool {}

func (dec *Decoder) tokenValueEnd() {}

type Delim

func (d Delim) String() string {}

// Token returns the next JSON token in the input stream.
// At the end of the input stream, Token returns nil, io.EOF.
//
// Token guarantees that the delimiters [ ] { } it returns are
// properly nested and matched: if Token encounters an unexpected
// delimiter in the input, it will return an error.
//
// The input stream consists of basic JSON values—bool, string,
// number, and null—along with delimiters [ ] { } of type Delim
// to mark the start and end of arrays and objects.
// Commas and colons are elided.
func (dec *Decoder) Token() (Token, error) {}

func clearOffset(err error) {}

func (dec *Decoder) tokenError(c byte) (Token, error) {}

// More reports whether there is another element in the
// current array or object being parsed.
func (dec *Decoder) More() bool {}

func (dec *Decoder) peek() (byte, error) {}