/**
* Returns the "type" name used for an entity type in the {@code data} section of the payload.
*/
private String getTypeName(Class<?> clazz) {
JsonTypeName override = clazz.getAnnotation(JsonTypeName.class);
if (override != null) {
return override.value();
}
return FlatPackTypes.decapitalize(clazz.getSimpleName());
}