simplejsondecoder

package module
v0.0.0-...-2c29741 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: MIT Imports: 4 Imported by: 0

README

go-simplejson-decoder

A brain-dead simple json.Decoder wrapper for go-simplejson.

Usage

decoder := New(reader)
for {
    j, err = decoder.Decode()
    if err != nil {
        break
    }
    // Here, j is simplejson object.
    // You can access properties of JSON data simply!
    i := j.MustMap()["number"].MustInt()
    .
    .
    .
}

LICENCE

MIT License

Author

Daisuke (yet another) Maki

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	json.Decoder
}

Decoder is a simple wrapper of encoding/json's Decoder returning simplejson.Json.

func New

func New(r io.Reader) *Decoder

New returns a new decoder that reads from r.

func (*Decoder) Decode

func (dec *Decoder) Decode() (*simplejson.Json, error)

Jump to

Keyboard shortcuts

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