| Modifier and Type | Field and Description |
|---|---|
protected org.apache.avro.Schema |
schema |
protected SchemaInfo |
schemaInfo |
| Modifier and Type | Method and Description |
|---|---|
protected static org.apache.avro.Schema |
createAvroSchema(SchemaDefinition schemaDefinition) |
T |
decode(byte[] bytes) |
byte[] |
encode(T message) |
protected org.apache.avro.Schema |
getAvroSchema() |
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
|
SchemaInfo |
getSchemaInfo() |
static <T> JSONSchema<T> |
of(Class<T> pojo) |
static <T> JSONSchema<T> |
of(Class<T> pojo,
Map<String,String> properties) |
static <T> JSONSchema<T> |
of(SchemaDefinition<T> schemaDefinition) |
protected static org.apache.avro.Schema |
parseAvroSchema(String jsonDef) |
protected final org.apache.avro.Schema schema
protected final SchemaInfo schemaInfo
public byte[] encode(T message) throws SchemaSerializationException
SchemaSerializationExceptionpublic T decode(byte[] bytes)
public SchemaInfo getSchemaInfo()
getSchemaInfo in interface Schema<T>public SchemaInfo getBackwardsCompatibleJsonSchemaInfo()
public static <T> JSONSchema<T> of(SchemaDefinition<T> schemaDefinition)
public static <T> JSONSchema<T> of(Class<T> pojo)
public static <T> JSONSchema<T> of(Class<T> pojo, Map<String,String> properties)
protected org.apache.avro.Schema getAvroSchema()
protected static org.apache.avro.Schema createAvroSchema(SchemaDefinition schemaDefinition)
protected static org.apache.avro.Schema parseAvroSchema(String jsonDef)
Copyright © 2017–2019 Apache Software Foundation. All rights reserved.