Documentation
¶
Overview ¶
Package decode converts native JSON semantics to safe validation feedback. It does not classify transport, storage, or application operational failures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallbackError ¶
func CallbackError(semantic *json.SemanticError) bool
CallbackError identifies ordinary errors from custom decoding methods, whose cause alone cannot establish whether the client supplied bad input. Explicit JSON syntax errors remain input errors. time.Time uses JSON v2's built-in representation, so its format errors retain normal input handling. Text methods are invoked only for JSON strings; native non-string rejection remains an input error. No application method is invoked by this inspection.
func Merge ¶
Merge adds schema violations to errs. JSON v2 leaves members after a failed decode untouched, so partial input suppresses misleading presence violations.
func Violation ¶
func Violation(semantic *json.SemanticError) validate.Errors
Violation preserves the native JSON Pointer without treating GoType as a field-format description. Unknown names retain "unknown"; other semantic failures use "decode" with an optional qualified default representation. Native error text, input values, and Go type names never reach the message.
Types ¶
This section is empty.