Class JSONSchema<T>
java.lang.Object
org.apache.pulsar.client.impl.schema.AbstractSchema<T>
org.apache.pulsar.client.impl.schema.AbstractStructSchema<T>
org.apache.pulsar.client.impl.schema.AvroBaseStructSchema<T>
org.apache.pulsar.client.impl.schema.JSONSchema<T>
A schema implementation to deal with json data.
-
Field Summary
Fields inherited from class org.apache.pulsar.client.impl.schema.AvroBaseStructSchema
schemaFields inherited from class org.apache.pulsar.client.impl.schema.AbstractStructSchema
LOG, reader, schemaInfo, schemaInfoProvider, writerFields inherited from interface org.apache.pulsar.client.api.Schema
BOOL, BYTEBUFFER, BYTES, DATE, DOUBLE, FLOAT, INSTANT, INT16, INT32, INT64, INT8, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, STRING, TIME, TIMESTAMP -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClears the caches tied to the ObjectMapper instances and replaces the singleton ObjectMapper instance.Implemented for backwards compatibility reasons.static <T> JSONSchema<T>static <T> JSONSchema<T>static <T> JSONSchema<T>of(SchemaDefinition<T> schemaDefinition) Methods inherited from class org.apache.pulsar.client.impl.schema.AvroBaseStructSchema
getAvroSchema, getNativeSchemaMethods inherited from class org.apache.pulsar.client.impl.schema.AbstractStructSchema
atSchemaVersion, decode, decode, decode, decode, decode, decode, encode, getReader, getSchemaInfo, setReader, setSchemaInfoProvider, setWriterMethods inherited from class org.apache.pulsar.client.impl.schema.AbstractSchema
cloneMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.client.api.Schema
configureSchemaInfo, requireFetchingSchemaInfo, supportSchemaVersioning, validate
-
Method Details
-
getBackwardsCompatibleJsonSchemaInfo
Implemented for backwards compatibility reasons. since the original schema generated by JSONSchema was based off the json schema standard since then we have standardized on Avro- Returns:
-
of
-
of
-
of
-
clearCaches
public static void clearCaches()Clears the caches tied to the ObjectMapper instances and replaces the singleton ObjectMapper instance. This can be used in tests to ensure that classloaders and class references don't leak across tests.
-