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>
- All Implemented Interfaces:
Cloneable,org.apache.pulsar.client.api.Schema<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 TypeMethodDescriptionorg.apache.pulsar.common.schema.SchemaInfoImplemented for backwards compatibility reasons.static <T> JSONSchema<T>static <T> JSONSchema<T>static <T> JSONSchema<T>of(org.apache.pulsar.client.api.schema.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
public org.apache.pulsar.common.schema.SchemaInfo 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
public static <T> JSONSchema<T> of(org.apache.pulsar.client.api.schema.SchemaDefinition<T> schemaDefinition) -
of
-
of
-