mirror of https://github.com/tidwall/gjson.git
fix GetManyBytes to use byte related methods
This commit is contained in:
parent
1e3f6aeaa5
commit
4c7d6ff4a9
6
gjson.go
6
gjson.go
|
@ -1626,7 +1626,11 @@ func GetMany(json string, path ...string) []Result {
|
||||||
// The return value is a Result array where the number of items
|
// The return value is a Result array where the number of items
|
||||||
// will be equal to the number of input paths.
|
// will be equal to the number of input paths.
|
||||||
func GetManyBytes(json []byte, path ...string) []Result {
|
func GetManyBytes(json []byte, path ...string) []Result {
|
||||||
return GetMany(string(json), path...)
|
res := make([]Result, len(path))
|
||||||
|
for i, path := range path {
|
||||||
|
res[i] = GetBytes(json, path)
|
||||||
|
}
|
||||||
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
var fieldsmu sync.RWMutex
|
var fieldsmu sync.RWMutex
|
||||||
|
|
Loading…
Reference in New Issue