return PTypes.jsonString(clazz, AvroTypeFamily.getInstance());
}
public static final <K, V> AvroTableType<K, V> tableOf(PType<K> key, PType<V> value) {
if (key instanceof PTableType) {
PTableType ptt = (PTableType) key;
key = Avros.pairs(ptt.getKeyType(), ptt.getValueType());
}
if (value instanceof PTableType) {
PTableType ptt = (PTableType) value;
value = Avros.pairs(ptt.getKeyType(), ptt.getValueType());
}
AvroType<K> avroKey = (AvroType<K>) key;
AvroType<V> avroValue = (AvroType<V>) value;
return new AvroTableType(avroKey, avroValue, Pair.class);
}