
com.at.avro.formatters.ArrayFormatter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avro-schema-generator Show documentation
Show all versions of avro-schema-generator Show documentation
Library for generating avro schema files (.avsc) based on DB tables structure
The newest version!
package com.at.avro.formatters;
import com.at.avro.config.FormatterConfig;
import com.at.avro.types.Array;
import static java.lang.String.format;
public class ArrayFormatter implements com.at.avro.formatters.Formatter {
@Override
public String toJson(Array array, FormatterConfig formatterConfig) {
return format("{ \"type\": \"array\", \"items\": \"%s\" }", array.getPrimitiveType());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy