json.Serializer attributes
Important:
Most of the attributes in this table apply only to json.Serializer. Attributes that also work with util.JSON, such as json_name and json_null, are identified in their descriptions.
| Attribute | Description |
|---|---|
|
Specify a record that can have properties whose names are not listed in the definition. |
|
Combine multiple record schemas into a single type using the JSONAllOf attribute in Genero BDL. |
|
Defines an explicit, typed list of acceptable values for a field and
maps to the enum keyword in JSON Schema. |
|
Defines a record that must match exactly one of several possible JSON schemas during serialization or deserialization. Used to handle polymorphic JSON structures where multiple schema definitions may apply. |
|
Specify which record member set with JSONOneOf needs to be serialized or deserialized. |
|
Specify a regular expression pattern for string values in a JSON schema. |
|
Specify properties that are required in a JSON schema. |
|
This attribute controls the representation of null or empty values.
json.Serializer uses it during both serialization and deserialization, but
util.JSON applies it only when serializing.
|
|
This attribute maps a BDL variable to a JSON element name that
cannot be represented as a valid BDL identifier, including names with spaces or special characters.
This attribute is supported by both json.Serializer and util.JSON. |