top
(README.md)
go-scan
=======

[![Build Status](https://travis-ci.org/mattn/go-scan.png?branch=master)](https://travis-ci.org/mattn/go-scan)
[![Coverage Status](https://coveralls.io/repos/mattn/go-scan/badge.png?branch=HEAD)](https://coveralls.io/r/mattn/go-scan?branch=HEAD)

Easily way to get the elements via xpath like string

Usage
-----

```go
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 (mattn.jp@gmail.com)

Imported by 11 package(s)

  1. github.com/funnythingz/martini-demo/websocket-simple-chat
  2. github.com/funnythingz/sandbox-go/websocket
  3. github.com/linyows/mox
  4. github.com/mattn/imgur
  5. github.com/mattn/milk
  6. github.com/sensorbee/sensorbee/server/testutil
  7. github.com/soh335/egotter
  8. github.com/tokuhirom/cpan-repository
  9. github.com/unirita/cuto/realtime/network
  10. github.com/yosisa/fluxion-out-prometheus
  11. gopkg.in/sensorbee/sensorbee.v0/server/testutil

Imported only in test by 8 package(s)

  1. github.com/b4b4r07/go-scan
  2. github.com/cubicdaiya/fluent-agent-hydra/hydra
  3. github.com/fujiwara/fluent-agent-hydra/hydra
  4. github.com/kjmkznr/fluent-agent-hydra/hydra
  5. github.com/kwmt/go-scan
  6. github.com/masahide/fluent-agent-hydra/hydra
  7. github.com/ssmylh/go-scan
  8. gopkg.in/pfnet/jasco.v1