From 1e958fddb566e0670ad87ee0cdd839442b014390 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 7 Oct 2022 12:02:35 +0200 Subject: [PATCH] Reset schema when unmarshalling "true" --- schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.go b/schema.go index ece502a..f5ada15 100644 --- a/schema.go +++ b/schema.go @@ -92,7 +92,7 @@ type Schema struct { func (schema *Schema) UnmarshalJSON(b []byte) error { if bytes.Equal(b, []byte("true")) { - // Nothing to do + *schema = Schema{} } else if bytes.Equal(b, []byte("false")) { *schema = Schema{Not: []Schema{ Schema{},