@Override
public <T> String marshall(T entity) {
try {
ObjectMapper objectMapper = new ObjectMapper().setVisibility(JsonMethod.FIELD, Visibility.ANY);
objectMapper.getSerializationConfig().addMixInAnnotations(Object.class, PropertyFilterMixIn.class);
SimpleFilterProvider filters = new SimpleFilterProvider();
List<java.lang.reflect.Field> fields = ClassUtil.getAnnotatedFields(entity, Column.class);
String[] targetedFieldNames = new String[fields.size()];
for (int i = 0; i < fields.size(); i++) {
targetedFieldNames[i] = fields.get(i).getName();
}
filters.addFilter("PropertyFilter", SimpleBeanPropertyFilter.filterOutAllExcept(targetedFieldNames));
ObjectWriter objectWriter = objectMapper.writer(filters);
String json = objectWriter.writeValueAsString(entity);
List<java.lang.reflect.Field> referencedEntities = ClassUtil.getAnnotatedFields(entity, Reference.class);
for (java.lang.reflect.Field field : referencedEntities) {