Skip to content

Commit 247ce1f

Browse files
committed
Return empty schema instead of panicking
1 parent 94e7c95 commit 247ce1f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

inferred_schema.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package jtdinfer
22

33
import (
4-
"fmt"
54
"reflect"
65
"strconv"
76
"time"
@@ -311,7 +310,7 @@ func (i *InferredSchema) Infer(value any, hints Hints) *InferredSchema {
311310
return &InferredSchema{SchemaType: SchemaTypeAny}
312311
}
313312

314-
panic(fmt.Sprintf("%T: %T (%v)", i.SchemaType, value, value))
313+
return &InferredSchema{}
315314
}
316315

317316
// IntoSchema will convert an `InferredSchema` to a final `Schema`.

0 commit comments

Comments
 (0)