From a93ef25a70052db9e6d6c2e6ca54539b6872abb1 Mon Sep 17 00:00:00 2001 From: Josh Baker Date: Fri, 12 Aug 2016 08:51:56 -0700 Subject: [PATCH] fixed exists check --- gjson.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gjson.go b/gjson.go index abc693d..ab685e7 100644 --- a/gjson.go +++ b/gjson.go @@ -57,7 +57,7 @@ func (t Result) String() string { // println("value exists") // } func (t Result) Exists() bool { - return t.Type != Null && len(t.Raw) != 0 + return t.Type != Null || len(t.Raw) != 0 } // Value returns one of these types: