本文整理匯總了Java中org.codehaus.jackson.Version.unknownVersion方法的典型用法代碼示例。如果您正苦於以下問題:Java Version.unknownVersion方法的具體用法?Java Version.unknownVersion怎麽用?Java Version.unknownVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.codehaus.jackson.Version
的用法示例。
在下文中一共展示了Version.unknownVersion方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getObjectMapper
import org.codehaus.jackson.Version; //導入方法依賴的package包/類
@Provides
public ObjectMapper getObjectMapper() {
// configure objectmapper and provide it
SimpleModule module = new SimpleModule("SimpleAbstractTypeResolver", Version.unknownVersion());
module.addAbstractTypeMapping(MutableBlobProperties.class, MutableBlobPropertiesImpl.class);
module.addAbstractTypeMapping(MutableContentMetadata.class, BaseMutableContentMetadata.class);
module.addAbstractTypeMapping(OrionSpecificFileMetadata.class, OrionSpecificFileMetadataImpl.class);
module.addAbstractTypeMapping(Attributes.class, AttributesImpl.class);
module.addAbstractTypeMapping(OrionError.class, OrionErrorImpl.class);
module.addAbstractTypeMapping(OrionChildMetadata.class, OrionChildMetadataImpl.class);
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(module);
mapper.setSerializationInclusion(Inclusion.NON_NULL);
mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return mapper;
}
示例2: RegisterSerializersObjectMapper
import org.codehaus.jackson.Version; //導入方法依賴的package包/類
public RegisterSerializersObjectMapper() {
System.out.println("Creating custom object mapper to include localdatetimeserializers");
//try to register it here so it should not require annotations on our objects
mapper = new ObjectMapper();
SimpleModule serializersModule = new SimpleModule("[De]Serializers module", Version.unknownVersion());
serializersModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer());
serializersModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer());
mapper.registerModule(serializersModule);
}
示例3: getListResponseSerialized
import org.codehaus.jackson.Version; //導入方法依賴的package包/類
String getListResponseSerialized(int total, int startIndex, List<BaseScimResource> resources, String attrsList,
String excludedAttrsList, boolean ignoreResults) throws IOException{
ListResponse listResponse = new ListResponse(startIndex, resources.size(), total);
listResponse.setResources(resources);
ObjectMapper mapper = new ObjectMapper();
SimpleModule module = new SimpleModule("ListResponseModule", Version.unknownVersion());
module.addSerializer(ListResponse.class, new ListResponseJsonSerializer(resourceSerializer, attrsList, excludedAttrsList, ignoreResults));
mapper.registerModule(module);
return mapper.writeValueAsString(listResponse);
}
示例4: getListResponseMapper
import org.codehaus.jackson.Version; //導入方法依賴的package包/類
public ObjectMapper getListResponseMapper(){
ObjectMapper mapper = new ObjectMapper();
SimpleModule module=new SimpleModule("ListResponseModule", Version.unknownVersion());
module.addSerializer(ListResponse.class, new ListResponseJsonSerializer(this));
mapper.registerModule(module);
return mapper;
}
示例5: jaxsonModule
import org.codehaus.jackson.Version; //導入方法依賴的package包/類
@Bean
@ConditionalOnMissingBean
public Module jaxsonModule() {
return new SimpleModule("legacyJacksonModule", Version.unknownVersion());
}