public static JSONSchema <T> Of(ISchemaDefinition <T> schemaDefinition) { ISchemaReader <T> Reader = schemaDefinition.SchemaReaderOpt.GetOrElse(new JsonReader <T>(_jsonMapper)); ISchemaWriter <T> Writer = schemaDefinition.SchemaWriterOpt.GetOrElse(new JsonWriter <T>(_jsonMapper)); return(new JSONSchema <T>(SchemaUtils.ParseSchemaInfo(schemaDefinition, SchemaType.JSON), schemaDefinition.Pojo, Reader, Writer)); }
public SchemaDefinitionImpl(Type pojo, string jsonDef, bool alwaysAllowNull, IDictionary <string, string> properties, bool supportSchemaVersioning, bool jsr310ConversionEnabled, ISchemaReader <T> reader, ISchemaWriter <T> writer) { _alwaysAllowNull = alwaysAllowNull; _properties = properties; _jsonDef = jsonDef; _pojo = pojo; _supportSchemaVersioning = supportSchemaVersioning; _jsr310ConversionEnabled = jsr310ConversionEnabled; _reader = reader; _writer = writer; }
private AvroSchema(ISchemaReader <T> reader, ISchemaWriter <T> writer, ISchemaInfo schemaInfo) : base(schemaInfo) { Reader = reader; Writer = writer; }
private JSONSchema(ISchemaInfo SchemaInfo, Type pojo, ISchemaReader <T> reader, ISchemaWriter <T> writer) : base(SchemaInfo) { _pojo = pojo; Writer = writer; Reader = reader; }
public ISchemaDefinitionBuilder <T> WithSchemaWriter(ISchemaWriter <T> writer) { _writer = writer; return(this); }