if(serializerDef.hasVersion()) {
Map<Integer, JsonTypeDefinition> versions = new HashMap<Integer, JsonTypeDefinition>();
for(Map.Entry<Integer, String> entry: serializerDef.getAllSchemaInfoVersions()
.entrySet())
versions.put(entry.getKey(), JsonTypeDefinition.fromJson(entry.getValue()));
return new JsonTypeSerializer(versions);
} else {
return new JsonTypeSerializer(JsonTypeDefinition.fromJson(serializerDef.getCurrentSchemaInfo()));
}
} else if(name.equals(PROTO_BUF_TYPE_NAME)) {
return new ProtoBufSerializer<Message>(serializerDef.getCurrentSchemaInfo());
} else if(name.equals(THRIFT_TYPE_NAME)) {
return new ThriftSerializer<TBase<?, ?>>(serializerDef.getCurrentSchemaInfo());