json.Serializer attributes

Important:

These serializer-specific attributes are supported only by json.Serializer and do not work with util.JSON.

Table 1. JSON attributes
Attribute Description
JSONAdditionalProperties = { true | false } 
Specify a record that can have properties whose names are not listed in the definition.
JSONOneOf
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.
JSONSelector
Specify which record member set with JSONOneOf needs to be serialized or deserialized.
JSONRequired
Specify properties that are required in a JSON schema.