mirror of https://github.com/tidwall/gjson.git
Fix issue around return values
This commit is contained in:
parent
e470b70571
commit
1144874cda
4
gjson.go
4
gjson.go
|
@ -527,14 +527,14 @@ func (value *Result) Parse(json string) {
|
|||
value.Type = String
|
||||
value.Raw, value.Str = tostr(json[i:])
|
||||
default:
|
||||
return Result{}
|
||||
value.Clear()
|
||||
return
|
||||
}
|
||||
break
|
||||
}
|
||||
if value.Exists() {
|
||||
value.Index = i
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
// ParseBytes parses the json and returns a result.
|
||||
|
|
Loading…
Reference in New Issue