All Projects → mattn → Go Scan

mattn / Go Scan

Programming Languages

go
31211 projects - #10 most used programming language

go-scan

Build Status Coverage Status

Easily way to get the elements via xpath like string

Usage

var js = strings.NewReader(`
{
	"foo": {
		"bar": [
			{
				"faz": true,
				"moo": ["goo", "mar"]
			},
			{
				"maz": true,
				"moo": ["foo", "bar"]
			}
		]
	}
}
`)
var s []string
scan.ScanJSON(js, "/foo/bar[1]/moo", &s) // s should be ["foo", "bar"]

Install

go get github.com/mattn/go-scan

License

MIT: http://mattn.mit-license.org/2013

Author

Yasuhiro Matsumoto ([email protected])

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].