Skip to content
Pure Go JSON Parser
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml
LICENSE
README.md
gjson.go
gjson_test.go
go.mod
go.sum

README.md

gjson - Fast JSON Parser written in pure Go

Build Status Coverage Status Go Report Card GoDoc

Installation

$ go get -u github.com/yagi5/gjson

Usage

package main

import (
	"fmt"

	"github.com/yagi5/gjson"
)

func main() {
	js := `{
			"key": "a", 
			"key2": [1, "a", true, null]
		}`
	jsMap, err := gjson.Decode([]byte(js))
	if err != nil {
		panic(err)
	}
	for key, val := range jsMap {
		fmt.Println(key)
		fmt.Println(val)
	}
}

// Output
// key
// a
// key2
// [1 a true nil]

Lisence

MIT

You can’t perform that action at this time.