Accept the ? character
This commit is contained in:
parent
6d10ae85ba
commit
de4a4ea863
4
gjson.go
4
gjson.go
@ -845,7 +845,7 @@ func parseObjectPath(path string) (r objectPathResult) {
|
|||||||
r.more = true
|
r.more = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if path[i] == '*' || path[i] == '?' {
|
if path[i] == '*' || path[i] == '?' || r.wild == true {
|
||||||
r.wild = true
|
r.wild = true
|
||||||
if (i + 1) < len(path) {
|
if (i + 1) < len(path) {
|
||||||
if path[i+1] == '.' {
|
if path[i+1] == '.' {
|
||||||
@ -993,7 +993,7 @@ func parseObject(c *parseContext, i int, path string) (int, bool) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
if c.json[i] == '}' {
|
if c.json[i] == '}' {
|
||||||
if rp.wild && strings.Contains(rp.part, "*") {
|
if rp.wild && (strings.Contains(rp.part, "*") || strings.Contains(rp.part, "?")) {
|
||||||
if rp.alogok {
|
if rp.alogok {
|
||||||
var jsons = make([]byte, 0, 64)
|
var jsons = make([]byte, 0, 64)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user