org.codehaus.jackson.map.deser.StdDeserializerProvider Java Examples

The following examples show how to use org.codehaus.jackson.map.deser.StdDeserializerProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JsonSchemaSerializer.java    From test-data-generator with Apache License 2.0 5 votes vote down vote up
public JsonSchemaSerializer() {
    objectMapper = new ObjectMapper();
    SimpleDeserializers simpleDeserializers = new SimpleDeserializers();
    simpleDeserializers.addDeserializer(String.class, new StringDeserializer());
    objectMapper.setDeserializerProvider(
            new StdDeserializerProvider().withAdditionalDeserializers(simpleDeserializers));
}
 
Example #2
Source File: ClientObjectMapper.java    From hraven with Apache License 2.0 5 votes vote down vote up
public static ObjectMapper createCustomMapper() {
  ObjectMapper result = new ObjectMapper();
  CustomDeserializerFactory deserializerFactory = new CustomDeserializerFactory();

  deserializerFactory.addSpecificMapping(Configuration.class, new ConfigurationDeserializer());
  deserializerFactory.addSpecificMapping(CounterMap.class, new CounterDeserializer());

  result.setDeserializerProvider(new StdDeserializerProvider(deserializerFactory));
  return result;
}
 
Example #3
Source File: JsonDeserializationBehavior.java    From jwala with Apache License 2.0 3 votes vote down vote up
public ObjectMapper toObjectMapper() {

        final CustomDeserializerFactory factory = createFactory();

        final DeserializerProvider deserializerProvider = new StdDeserializerProvider(factory);

        final ObjectMapper mapper = new ObjectMapper();
        mapper.setDeserializerProvider(deserializerProvider);

        return mapper;
    }