General purpose AVRO schema generator from JSON schema. Supported data types are
- NUMBER
- STRING
- ARRAY
- OBJECT
- git clone
- mvn clean install
-
java -jar target/avro-schema-generator-1.0-SNAPSHOT.jar '{ "key1": 2.2, "key2": { "key3": "string" } }'
-
{ "namespace" : "com.sgmarghade.test", "name" : "outer_record", "type" : "record", "fields" : [ { "name" : "key1", "type" : "double" }, { "name" : "key2", "type" : { "type" : "record", "name" : "key2_17", "fields" : [ { "name" : "key3", "type" : "string" } ] } } ]}
- String avroSchemaString = new AvroConverter(new ObjectMapper()).convert(jsonString);