Class JSONSchema<T>

All Implemented Interfaces:
Cloneable, Schema<T>

public class JSONSchema<T> extends AvroBaseStructSchema<T>
A schema implementation to deal with json data.
  • Method Details

    • getBackwardsCompatibleJsonSchemaInfo

      public 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(SchemaDefinition<T> schemaDefinition)
    • of

      public static <T> JSONSchema<T> of(Class<T> pojo)
    • of

      public static <T> JSONSchema<T> of(Class<T> pojo, Map<String,String> properties)
    • 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.