juliangruber / Go Binary Extract
Extract a value from a json blob without parsing the whole thing
Stars: ✭ 38
Programming Languages
go
31211 projects - #10 most used programming language
go-binary-extract
Extract a value from a json blob without parsing the whole thing.
This is a go port of the initial node.js implementation.
Read the docs.
Installation
$ go get github.com/juliangruber/go-binary-extract
Example
import "github.com/juliangruber/go-binary-extract"
value, err := Extract([]byte("{\"foo\":\"bar\"}"), "foo")
if err != nil {
panic(err)
}
fmt.Println(value) // "bar"
Perf
With the object from extract_test.go
, Extract()
is 20x faster than
json.Unmarshal()
.
License
MIT
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].