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.Type = String
|
||||||
value.Raw, value.Str = tostr(json[i:])
|
value.Raw, value.Str = tostr(json[i:])
|
||||||
default:
|
default:
|
||||||
return Result{}
|
value.Clear()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if value.Exists() {
|
if value.Exists() {
|
||||||
value.Index = i
|
value.Index = i
|
||||||
}
|
}
|
||||||
return value
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParseBytes parses the json and returns a result.
|
// ParseBytes parses the json and returns a result.
|
||||||
|
|
Loading…
Reference in New Issue