Exemplo n.º 1
0
// NewDecoder returns a new Decoder, ready to read from jsr.
func NewJsonDecoder(jsd *json.Decoder) *Decoder {
	jsd.UseNumber()

	decoders := make(map[string]Handler)

	d := Decoder{jsd: jsd, decoders: decoders, cache: NewRollingCache()}
	initHandlers(&d)

	return &d
}