Java 类org.codehaus.jackson.mrbean.MrBeanModule 实例源码

项目:at.info-knowledge-base    文件:ObjectMapperProvider.java   
private static ObjectMapper createDefaultMapper() {
    final ObjectMapper result = new ObjectMapper();
    result.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
    result.registerModule(new MrBeanModule());

    return result;
}
项目:spring-data-simpledb    文件:JsonMarshaller.java   
private JsonMarshaller() {
    JsonFactory factory = new JsonFactory();
    jsonMapper = new ObjectMapper(factory);
       jsonMapper.enableDefaultTypingAsProperty(ObjectMapper.DefaultTyping.NON_FINAL, "@class");
       JsonUnknownPropertyHandler jsonUnknownPropertyHandler = new JsonUnknownPropertyHandler();
    jsonMapper.getDeserializationConfig().addHandler(jsonUnknownPropertyHandler);
    jsonMapper.registerModule(new MrBeanModule());
}