Jackson replace field with a Custom Serializer

This code snipped shows you how can you can replace field with a custom serializer. This might be helpful if you want to modify or ignore certain fields. private class CustomValueSerializer extends StdSerializer<WebTemplateResource> { private final String url; public CustomValueSerializer(String url) { super(WebTemplateResource.class); this.url = url; } @Override public void serialize(WebTemplateResource res, JsonGenerator jgen, SerializerProvider […]

Weiterlesen...