Package com.solace.serdes.jsonschema
Class JsonSchemaProperties
- java.lang.Object
-
- com.solace.serdes.common.resolver.config.BaseProperties
-
- com.solace.serdes.common.SerdeProperties
-
- com.solace.serdes.jsonschema.JsonSchemaProperties
-
public class JsonSchemaProperties extends SerdeProperties
A class for configuring json schema properties. This is used byJsonSchemaSerializer
andJsonSchemaDeserializer
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
TYPE_PROPERTY
Specifies the JSON schema property name that contains the Java type class path for deserialization.static String
VALIDATE_SCHEMA
Boolean flag that enables JSON schema validation during serialization/deserialization.-
Fields inherited from class com.solace.serdes.common.SerdeProperties
DESERIALIZED_TYPE, EXPLICIT_SCHEMA_ID, SCHEMA_HEADER_IDENTIFIERS, SCHEMA_RESOLVER
-
-
Constructor Summary
Constructors Constructor Description JsonSchemaProperties()
Constructs a new JsonSchemaProperties instance with default properties.JsonSchemaProperties(Map<String,?> map)
Constructs a new JsonSchemaProperties instance with default properties then applies properties from the passed in map.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,Object>
getDefaults()
Gets a copy of the default JsonSchemaProperties properties.String
getTypeProperty()
Gets the JSON schema property name that contains the Java type class path for deserialization.boolean
getValidateSchema()
Gets whether JSON schema validation is enabled for serialization and deserialization.-
Methods inherited from class com.solace.serdes.common.SerdeProperties
getDeserializedType, getExplicitSchemaId, getSchemaHeaderIdentifiers, getSchemaResolverClass
-
Methods inherited from class com.solace.serdes.common.resolver.config.BaseProperties
getConfig
-
-
-
-
Field Detail
-
VALIDATE_SCHEMA
public static final String VALIDATE_SCHEMA
Boolean flag that enables JSON schema validation during serialization/deserialization. When set to true, the serializer/deserializer will validate JSON data against its schema. This validation ensures that the JSON data conforms to the expected schema structure. The default is true.- See Also:
- Constant Field Values
-
TYPE_PROPERTY
public static final String TYPE_PROPERTY
Specifies the JSON schema property name that contains the Java type class path for deserialization. The JsonSchemaDeserializer uses this JSON schema property to determine the target Java class when deserializing. The default is "javaType".- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaults
public static Map<String,Object> getDefaults()
Gets a copy of the default JsonSchemaProperties properties. This contains defaults defined inSerdeProperties
.- Returns:
- A copy of the default set properties.
- See Also:
SerdeProperties
-
getValidateSchema
public boolean getValidateSchema()
Gets whether JSON schema validation is enabled for serialization and deserialization. When enabled, JSON data will be validated against its schema during processing.- Returns:
- true if JSON schema validation is enabled, false otherwise
-
getTypeProperty
public String getTypeProperty()
Gets the JSON schema property name that contains the Java type class path for deserialization. The JsonSchemaDeserializer uses this property to determine the target Java class.- Returns:
- the name of the JSON schema property containing the Java type, or returns the default value if not configured
-
-