From 1144874cdacf997784d4889ed982b334102e1dcb Mon Sep 17 00:00:00 2001 From: Robert Weber Date: Fri, 15 Nov 2024 09:33:33 -0700 Subject: [PATCH] Fix issue around return values --- gjson.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gjson.go b/gjson.go index ba53a28..1dd55d3 100644 --- a/gjson.go +++ b/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.