The json.Serializer class
The json.Serializer class provides methods to serialize Genero BDL
variable to JSON objects and vice versa.
The
json.Serializer class is provided in the json
C-Extension library. To use the
json.Serializer class, you must import the json package in your
program:IMPORT jsonThe json.Serializer class provides methods that comply with schema-validation
standards (JSON Schema
and OpenAPI)
and that:
- Serialize Genero BDL variables to JSON objects.
- Deserialize JSON objects to Genero BDL variables.
Note:
The In contrast, util.JSON is designed to manipulate raw JSON data; it does not handle schema validation.
json.Serializer class is a static class and does not have to be
instantiated. The status variable is set to zero after a successful method call.Implicit and explicit conversion of JSON to BDL
json.Serializer:Implements strict, schema-driven conversion (explicit). Validates against JSON Schema/OpenAPI and performs controlled serialization/deserialization.util.JSONImplements permissive, dynamic conversion (implicit). Designed only to manipulate raw JSON data; it does not handle schema validation.