Implicit and explicit JSON conversion in json.Serializer and util.JSON
This topic provides an overview of implicit and explicit JSON conversion behavior in
json.Serializer and util.JSON, highlighting the differences
between strict and permissive conversion models.
Understanding the differences between json.Serializer and util.JSON is important when
working with JSON conversion in Genero BDL. json.Serializer performs strict,
schema-driven conversion, while util.JSON applies permissive, dynamic conversion
rules.
The following sections compare implicit and explicit conversion behavior for primitive and complex types, including type casting rules, failure scenarios, and the impact of options such as allowImplicitConversion. These sections also describe how null and empty values are handled.
For additional options that influence conversion behavior, go to json.Serializer options.