Class CustomObjectMapper

  • All Implemented Interfaces:
    javax.ws.rs.ext.ContextResolver<com.fasterxml.jackson.databind.ObjectMapper>

    @Provider
    public class CustomObjectMapper
    extends Object
    implements javax.ws.rs.ext.ContextResolver<com.fasterxml.jackson.databind.ObjectMapper>
    Custom mapper with property CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES to perform serialization/deserialization with snake case over camel case for json beans.
    Author:
    Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
    • Constructor Detail

      • CustomObjectMapper

        public CustomObjectMapper()
    • Method Detail

      • getContext

        public com.fasterxml.jackson.databind.ObjectMapper getContext​(Class<?> type)
        Specified by:
        getContext in interface javax.ws.rs.ext.ContextResolver<com.fasterxml.jackson.databind.ObjectMapper>