Reset schema when unmarshalling "true"

This commit is contained in:
Simon Ser 2022-10-07 12:02:35 +02:00
parent 7b432ffe7f
commit 1e958fddb5

View file

@ -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{},