The following code examples are extracted from open source projects. You can click  to vote up the examples that are useful to you.

Example 1

From project rest-support, under directory /hudson-rest-common/src/main/java/org/hudsonci/rest/common/.

Source file: ObjectMapperProvider.java

  19 
public ObjectMapperProvider(){
final ObjectMapper mapper=new ObjectMapper();
DeserializationConfig dconfig=mapper.getDeserializationConfig();
dconfig.setAnnotationIntrospector(new JacksonAnnotationIntrospector());
SerializationConfig sconfig=mapper.getSerializationConfig();
sconfig.setAnnotationIntrospector(new JacksonAnnotationIntrospector());
sconfig.setSerializationInclusion(NON_NULL);
mapper.configure(WRITE_DATES_AS_TIMESTAMPS,false);
mapper.configure(AUTO_DETECT_IS_GETTERS,false);
mapper.configure(AUTO_DETECT_GETTERS,false);
mapper.configure(AUTO_DETECT_SETTERS,false);
this.mapper=mapper;
}
 

Example 2

From project sisu-goodies, under directory/marshal/src/main/java/org/sonatype/sisu/goodies/marshal/internal/jackson/.

Source file: ObjectMapperProvider.java

  18 
public ObjectMapperProvider(){
final ObjectMapper mapper=new ObjectMapper();
DeserializationConfig dconfig=mapper.getDeserializationConfig();
dconfig.withAnnotationIntrospector(new JacksonAnnotationIntrospector());
SerializationConfig sconfig=mapper.getSerializationConfig();
sconfig.withAnnotationIntrospector(new JacksonAnnotationIntrospector());
sconfig.setSerializationInclusion(NON_NULL);
mapper.configure(WRITE_DATES_AS_TIMESTAMPS,false);
mapper.configure(INDENT_OUTPUT,true);
this.mapper=mapper;
}
 

Example 3

From project ANNIS, under directory /annis-service/src/main/java/annis/.

Source file: AnnisRunner.java

  17 
public void doAnnotations(String doListValues){
boolean listValues="values".equals(doListValues);
List<AnnisAttribute> annotations=annisDao.listAnnotations(getCorpusList(),listValues,true);
try {
ObjectMapper om=new ObjectMapper();
AnnotationIntrospector ai=new JaxbAnnotationIntrospector();
DeserializationConfig config=om.getDeserializationConfig().withAnnotationIntrospector(ai);
om.setDeserializationConfig(config);
om.configure(SerializationConfig.Feature.INDENT_OUTPUT,true);
System.out.println(om.writeValueAsString(annotations));
}
catch ( IOException ex) {
log.error("problems with writing result",ex);
}
}
 

Example 4

From project MailJimp, under directory /mailjimp-core/src/main/java/mailjimp/service/impl/.

Source file: MailJimpJsonService.java

  17 
@PostConstruct public void init(){
checkConfig();
log.info("Creating MailChimp integration client.");
String url=buildServerURL();
log.info("Server URL is: {}",url);
client=Client.create();
resource=client.resource(url);
SerializationConfig s=m.getSerializationConfig();
s.setSerializationInclusion(Inclusion.NON_NULL);
s.withDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
m.setSerializationConfig(s);
DeserializationConfig d=m.getDeserializationConfig();
d.withDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
m.setDeserializationConfig(d);
m.setDateFormat(new SimpleDateFormat("yyyy-MM-MM HH:mm:ss"));
}

Example 5

From project airlift, under directory /json/src/main/java/io/airlift/json/.

Source file: ObjectMapperProvider.java

  15 
@Override public ObjectMapper get(){
ObjectMapper objectMapper=new ObjectMapper();
objectMapper.getDeserializationConfig().disable(FAIL_ON_UNKNOWN_PROPERTIES);
objectMapper.getSerializationConfig().disable(WRITE_DATES_AS_TIMESTAMPS);
objectMapper.getSerializationConfig().setSerializationInclusion(NON_NULL);
objectMapper.getDeserializationConfig().disable(DeserializationConfig.Feature.AUTO_DETECT_FIELDS);
objectMapper.getDeserializationConfig().disable(AUTO_DETECT_SETTERS);
objectMapper.getSerializationConfig().disable(SerializationConfig.Feature.AUTO_DETECT_FIELDS);
objectMapper.getSerializationConfig().disable(AUTO_DETECT_GETTERS);
objectMapper.getSerializationConfig().disable(AUTO_DETECT_IS_GETTERS);
if (jsonSerializers != null || jsonDeserializers != null || keySerializers != null || keyDeserializers != null) {
SimpleModule module=new SimpleModule(getClass().getName(),new Version(1,0,0,null));
if (jsonSerializers != null) {
for ( Entry<Class<?>,JsonSerializer<?>> entry : jsonSerializers.entrySet()) {
addSerializer(module,entry.getKey(),entry.getValue());
}
}
if (jsonDeserializers != null) {
for ( Entry<Class<?>,JsonDeserializer<?>> entry : jsonDeserializers.entrySet()) {
addDeserializer(module,entry.getKey(),entry.getValue());
}
}
if (keySerializers != null) {
for ( Entry<Class<?>,JsonSerializer<?>> entry : keySerializers.entrySet()) {
addKeySerializer(module,entry.getKey(),entry.getValue());
}
}
if (keyDeserializers != null) {
for ( Entry<Class<?>,KeyDeserializer> entry : keyDeserializers.entrySet()) {
module.addKeyDeserializer(entry.getKey(),entry.getValue());
}
}
objectMapper.registerModule(module);
}
return objectMapper;
}

Example 6

From project AutobahnAndroid, under directory /Autobahn/src/de/tavendo/autobahn/.

Source file: WampReader.java

  15 
/**
* A reader object is created in AutobahnConnection.
* @param calls The call map created on master.
* @param subs The event subscription map created on master.
* @param master Message handler of master (used by us to notify the master).
* @param socket The TCP socket.
* @param options WebSockets connection options.
* @param threadName The thread name we announce.
*/
public WampReader(ConcurrentHashMap<String,CallMeta> calls,ConcurrentHashMap<String,SubMeta> subs,Handler master,SocketChannel socket,WebSocketOptions options,String threadName){
super(master,socket,options,threadName);
mCalls=calls;
mSubs=subs;
mJsonMapper=new ObjectMapper();
mJsonMapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,false);
mJsonFactory=mJsonMapper.getJsonFactory();
if (DEBUG) Log.d(TAG,"created");
}

Example 7

From project build-info, under directory /build-info-extractor/src/main/java/org/jfrog/build/extractor/.

Source file: BuildInfoExtractorUtils.java

  15 
private static JsonFactory createJsonFactory(){
JsonFactory jsonFactory=new JsonFactory();
ObjectMapper mapper=new ObjectMapper(jsonFactory);
mapper.getSerializationConfig().setAnnotationIntrospector(new JacksonAnnotationIntrospector());
mapper.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
mapper.getDeserializationConfig().disable(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES);
jsonFactory.setCodec(mapper);
return jsonFactory;
}

Example 8

From project candlepin, under directory /src/main/java/org/candlepin/sync/.

Source file: SyncUtils.java

  15 
static ObjectMapper getObjectMapper(Config config){
ObjectMapper mapper=new ObjectMapper();
AnnotationIntrospector primary=new JacksonAnnotationIntrospector();
AnnotationIntrospector secondary=new JaxbAnnotationIntrospector();
AnnotationIntrospector pair=new AnnotationIntrospector.Pair(primary,secondary);
mapper.setAnnotationIntrospector(pair);
mapper.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS,false);
SimpleFilterProvider filterProvider=new SimpleFilterProvider();
filterProvider.setDefaultFilter(new ExportBeanPropertyFilter());
mapper.setFilters(filterProvider);
if (config != null) {
mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,config.failOnUnknownImportProperties());
}
return mapper;
}

Example 9

From project components-ness-jackson, under directory /src/main/java/com/nesscomputing/jackson/.

Source file: MapEntryModule.java

  15 
@Override public JsonDeserializer<?> findBeanDeserializer(JavaType type,DeserializationConfig config,DeserializerProvider provider,BeanDescription beanDesc,BeanProperty property) throws JsonMappingException {
if (type.getRawClass().equals(Map.Entry.class)) {
return new MapEntryDeserializer(type,property);
}
return null;
}

Example 10

From project crest, under directory /core/src/main/java/org/codegist/crest/serializer/jackson/.

Source file: JacksonFactory.java

  15 
static ObjectMapper createObjectMapper(CRestConfig crestConfig,Class<?> source){
String prefix=source.getName();
ObjectMapper mapper=crestConfig.get(prefix + JACKSON_OBJECT_MAPPER);
if (mapper != null) {
return mapper;
}
mapper=new ObjectMapper();
Map<DeserializationConfig.Feature,Boolean> deserConfig=crestConfig.get(prefix + JACKSON_DESERIALIZER_CONFIG,DEFAULT_DESERIALIZER_CONFIG);
for ( Map.Entry<DeserializationConfig.Feature,Boolean> feature : deserConfig.entrySet()) {
mapper.configure(feature.getKey(),feature.getValue());
}
Map<SerializationConfig.Feature,Boolean> serConfig=crestConfig.get(prefix + JACKSON_SERIALIZER_CONFIG,DEFAULT_SERIALIZER_CONFIG);
for ( Map.Entry<SerializationConfig.Feature,Boolean> feature : serConfig.entrySet()) {
mapper.configure(feature.getKey(),feature.getValue());
}
return mapper;
}

Example 11

From project Faye-Android, under directory /src/com/b3rwynmobile/fayeclient/autobahn/.

Source file: WampReader.java

  15 
/**
* A reader object is created in AutobahnConnection.
* @param calls The call map created on master.
* @param subs The event subscription map created on master.
* @param master Message handler of master (used by us to notify the master).
* @param socket The TCP socket.
* @param options WebSockets connection options.
* @param threadName The thread name we announce.
*/
public WampReader(ConcurrentHashMap<String,CallMeta> calls,ConcurrentHashMap<String,SubMeta> subs,Handler master,SocketChannel socket,WebSocketOptions options,String threadName){
super(master,socket,options,threadName);
mCalls=calls;
mSubs=subs;
mJsonMapper=new ObjectMapper();
mJsonMapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,false);
mJsonFactory=mJsonMapper.getJsonFactory();
if (DEBUG) Log.d(TAG,"created");
}

Example 12

From project geolatte-common, under directory /src/test/java/org/geolatte/common/dataformats/json/.

Source file: GeoJsonToDeserializationTest.java

  15 
@BeforeClass public static void setupSuite(){
assembler=new GeoJsonToAssembler();
mapper=new ObjectMapper();
JacksonConfiguration.applyMixin(mapper);
mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,false);
}

Example 13

From project gnip4j, under directory /core/src/main/java/com/zaubersoftware/gnip4j/api/impl/.

Source file: DefaultGnipStream.java

  15 
public static final ObjectMapper getObjectMapper(){
final ObjectMapper mapper=new ObjectMapper();
SimpleModule gnipActivityModule=new SimpleModule("gnip.activity",new Version(1,0,0,null));
gnipActivityModule.addDeserializer(Geo.class,new GeoDeserializer(Geo.class));
mapper.registerModule(gnipActivityModule);
mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,false);
return mapper;
}

Example 14

From project jetty-session-redis, under directory /src/main/java/com/ovea/jetty/session/serializer/.

Source file: JsonSerializer.java

  15 
@Override public void start(){
mapper=new ObjectMapper();
mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE,false);
mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT,false);
mapper.configure(SerializationConfig.Feature.AUTO_DETECT_GETTERS,false);
mapper.configure(SerializationConfig.Feature.AUTO_DETECT_IS_GETTERS,false);
mapper.configure(SerializationConfig.Feature.AUTO_DETECT_FIELDS,true);
mapper.configure(SerializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS,true);
mapper.configure(SerializationConfig.Feature.USE_STATIC_TYPING,false);
mapper.configure(SerializationConfig.Feature.WRITE_ENUMS_USING_TO_STRING,false);
mapper.configure(SerializationConfig.Feature.SORT_PROPERTIES_ALPHABETICALLY,true);
mapper.configure(SerializationConfig.Feature.USE_ANNOTATIONS,true);
mapper.configure(DeserializationConfig.Feature.USE_ANNOTATIONS,true);
mapper.configure(DeserializationConfig.Feature.AUTO_DETECT_SETTERS,false);
mapper.configure(DeserializationConfig.Feature.AUTO_DETECT_CREATORS,true);
mapper.configure(DeserializationConfig.Feature.AUTO_DETECT_FIELDS,true);
mapper.configure(DeserializationConfig.Feature.USE_GETTERS_AS_SETTERS,false);
mapper.configure(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS,true);
mapper.configure(DeserializationConfig.Feature.READ_ENUMS_USING_TO_STRING,true);
mapper.setVisibilityChecker(new VisibilityChecker.Std(ANY,ANY,ANY,ANY,ANY));
super.start();
}

Example 15

From project mongo-jackson-mapper, under directory /src/main/java/net/vz/mongodb/jackson/internal/.

Source file: MongoJacksonDeserializers.java

  15 
public JsonDeserializer<?> findBeanDeserializer(JavaType type,DeserializationConfig config,DeserializerProvider provider,BeanDescription beanDesc,BeanProperty property) throws JsonMappingException {
if (type.getRawClass() == DBRef.class) {
if (!type.hasGenericTypes()) {
throw new JsonMappingException("Property " + property + " doesn't declare object and key type");
}
JavaType objectType=type.containedType(0);
JavaType keyType=type.containedType(1);
return new DBRefDeserializer(objectType,keyType);
}
return super.findBeanDeserializer(type,config,provider,beanDesc,property);
}

Example 16

From project platform_3, under directory /json/src/main/java/com/proofpoint/json/.

Source file: ObjectMapperProvider.java

  15 
@Override public ObjectMapper get(){
ObjectMapper objectMapper=new ObjectMapper();
objectMapper.getDeserializationConfig().disable(FAIL_ON_UNKNOWN_PROPERTIES);
objectMapper.getSerializationConfig().disable(WRITE_DATES_AS_TIMESTAMPS);
objectMapper.getSerializationConfig().setSerializationInclusion(NON_NULL);
objectMapper.getDeserializationConfig().disable(DeserializationConfig.Feature.AUTO_DETECT_FIELDS);
objectMapper.getDeserializationConfig().disable(AUTO_DETECT_SETTERS);
objectMapper.getSerializationConfig().disable(SerializationConfig.Feature.AUTO_DETECT_FIELDS);
objectMapper.getSerializationConfig().disable(AUTO_DETECT_GETTERS);
objectMapper.getSerializationConfig().disable(AUTO_DETECT_IS_GETTERS);
if (jsonSerializers != null || jsonDeserializers != null || keySerializers != null || keyDeserializers != null) {
SimpleModule module=new SimpleModule(getClass().getName(),new Version(1,0,0,null));
if (jsonSerializers != null) {
for ( Entry<Class<?>,JsonSerializer<?>> entry : jsonSerializers.entrySet()) {
addSerializer(module,entry.getKey(),entry.getValue());
}
}
if (jsonDeserializers != null) {
for ( Entry<Class<?>,JsonDeserializer<?>> entry : jsonDeserializers.entrySet()) {
addDeserializer(module,entry.getKey(),entry.getValue());
}
}
if (keySerializers != null) {
for ( Entry<Class<?>,JsonSerializer<?>> entry : keySerializers.entrySet()) {
addKeySerializer(module,entry.getKey(),entry.getValue());
}
}
if (keyDeserializers != null) {
for ( Entry<Class<?>,KeyDeserializer> entry : keyDeserializers.entrySet()) {
module.addKeyDeserializer(entry.getKey(),entry.getValue());
}
}
objectMapper.registerModule(module);
}
return objectMapper;
}

Example 17

From project RHQpocket, under directory /src/org/rhq/pocket/alert/.

Source file: AlertListFragment.java

  15 
protected void fetchAlerts(){
String subUrl="/alert";
if (resourceId > 0) {
subUrl=subUrl + "?resourceId=" + resourceId;
}
new TalkToServerTask(getActivity(),new FinishCallback(){
@Override public void onSuccess( JsonNode result){
ObjectMapper objectMapper=new ObjectMapper();
objectMapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,false);
try {
alertList=objectMapper.readValue(result,new TypeReference<List<AlertRest>>(){
}
);
setListAdapter(new AlertListItemAdapter(getActivity(),R.layout.alert_list_item,alertList));
ProgressBar pb=(ProgressBar)layout.findViewById(R.id.list_progress);
if (pb != null) pb.setVisibility(View.GONE);
getListView().requestLayout();
getListView().requestLayout();
}
catch ( IOException e) {
e.printStackTrace();
}
}
@Override public void onFailure( Exception e){
e.printStackTrace();
}
}
,subUrl).execute();
}

Example 18

From project spring-social-facebook, under directory /spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/.

Source file: SignedRequestDecoder.java

  15 
/**
* @param secret the application secret used in creating and verifying the signature of the signed request.
*/
public SignedRequestDecoder(String secret){
this.secret=secret;
this.objectMapper=new ObjectMapper();
this.objectMapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,false);
this.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
}

Example 19

From project spring-social-flickr, under directory /core/src/main/java/org/springframework/social/flickr/api/impl/.

Source file: FlickrObjectMapper.java

  15 
protected Object _unwrapAndDeserialize(JsonParser jp,JavaType rootType,DeserializationContext ctxt,JsonDeserializer<Object> deser) throws IOException, JsonParseException, JsonMappingException {
ObjectMapper mapper=new ObjectMapper();
mapper.setDeserializationConfig(ctxt.getConfig());
mapper.disable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE);
jp.setCodec(mapper);
JsonNode tree=jp.readValueAsTree();
JsonNode statNode=tree.get("stat");
String status=statNode.getTextValue();
if (!"ok".equals(status)) {
JsonNode msgNode=tree.get("message");
String errorMsg=msgNode.getTextValue();
JsonNode codeNode=tree.get("code");
String errorCode=codeNode.getTextValue();
throw new FlickrException(errorMsg);
}
jp=jp.getCodec().treeAsTokens(tree);
jp.nextToken();
SerializedString rootName=_deserializerProvider.findExpectedRootName(ctxt.getConfig(),rootType);
if (jp.getCurrentToken() != JsonToken.START_OBJECT) {
throw JsonMappingException.from(jp,"Current token not START_OBJECT (needed to unwrap root name '" + rootName + "'), but "+ jp.getCurrentToken());
}
if (jp.nextToken() != JsonToken.FIELD_NAME) {
throw JsonMappingException.from(jp,"Current token not FIELD_NAME (to contain expected root name '" + rootName + "'), but "+ jp.getCurrentToken());
}
String actualName=jp.getCurrentName();
if ("stat".equals(actualName)) {
return null;
}
jp.nextToken();
Object result=deser.deserialize(jp,ctxt);
jp.nextToken();
jp.nextToken();
if (jp.nextToken() != JsonToken.END_OBJECT) {
throw JsonMappingException.from(jp,"Current token not END_OBJECT (to match wrapper object with root name '" + rootName + "'), but "+ jp.getCurrentToken());
}
return result;
}

Example 20

From project st-js, under directory /server/src/main/java/org/stjs/server/json/jackson/.

Source file: JSArrayDeserializer.java

  15 
/**
* Helper method called when current token is no START_ARRAY. Will either throw an exception, or try to handle value as if member of implicit array, depending on configuration.
*/
private final Array<Object> handleNonArray(JsonParser jp,DeserializationContext ctxt,Array<Object> result) throws IOException, JsonProcessingException {
if (!ctxt.isEnabled(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)) {
throw ctxt.mappingException(_collectionType.getRawClass());
}
JsonDeserializer<Object> valueDes=_valueDeserializer;
final TypeDeserializer typeDeser=_valueTypeDeserializer;
JsonToken t=jp.getCurrentToken();
Object value;
if (t == JsonToken.VALUE_NULL) {
value=null;
}
else if (typeDeser == null) {
value=valueDes.deserialize(jp,ctxt);
}
else {
value=valueDes.deserializeWithType(jp,ctxt,typeDeser);
}
result.push(value);
return result;
}

Example 21

From project wharf, under directory /wharf-core/src/main/java/org/jfrog/wharf/ivy/marshall/jackson/.

Source file: JacksonFactory.java

  15 
/**
* Update the parser with a default codec
* @param jsonFactory Factory to set as codec
* @param jsonParser Parser to configure
*/
private static void updateParser(JsonFactory jsonFactory,JsonParser jsonParser){
AnnotationIntrospector primary=new JacksonAnnotationIntrospector();
ObjectMapper mapper=new ObjectMapper(jsonFactory);
mapper.getSerializationConfig().setAnnotationIntrospector(primary);
mapper.getDeserializationConfig().setAnnotationIntrospector(primary);
mapper.getDeserializationConfig().disable(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES);
jsonParser.setCodec(mapper);
}

Java Code Examples for org.codehaus.jackson.map.DeserializationConfig 配置的更多相关文章

  1. org.codehaus.jackson.map.JsonMappingException: Can not construct instance of java.util.Date from String value '20Spring Jackson 反序列化Date时遇到的问题

    Jackson对于date的反序列化只支持几种,如果不符合默认格式则会报一下错误 org.codehaus.jackson.map.JsonMappingException: Can not cons ...

  2. org.codehaus.jackson.map.JsonMappingException: Can not construct instance of java.util.Date from String value '2012-12-12 12:01:01': not a valid representation (error: Can not parse date "2012-12-

    Jackson对于date的反序列化只支持几种,如果不符合默认格式则会报一下错误 org.codehaus.jackson.map.JsonMappingException: Can not cons ...

  3. at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:142) :json转化“$ref 循环引用”的问题

    原因: entity实体中存在@OneToMany,@ManyToOne注解,在转化json是产生了循环引用 报的错误 解决方法: springmvc @ResponseBody 默认的json转化用 ...

  4. SpringMVC 集成 jackson,日志格式报错:org.codehaus.jackson.map.JsonMappingException: Can not construct instance of java.util.Date from String value

    org.codehaus.jackson.map.JsonMappingException: Can not construct instance of java.util.Date from Str ...

  5. 报错:java.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException

    报错背景: 执行hdfs-mysql的job任务的时候报错. 报错现象: Exception has occurred during processing command Exception: org ...

  6. org.codehaus.jackson.map.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.

    2011-08-16 13:26:58,484 [http-8080-1] ERROR [core.web.ExceptionInterceptor] - org.codehaus.jackson.m ...

  7. hadoop出现ava.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException

    Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonMa ...

  8. 报错:org.apache.sqoop.common.SqoopException Message: CLIENT_0001:Server has returned exception NoClassDefFoundError: org/codehaus/jackson/map/JsonMappingException

    报错背景: CDH集成sqoop2服务之后,创建好link和job之后,执行job的时候报错. 报错现象: sqoop:> start job -j Exception has occurred ...

  9. [转]Java Code Examples for android.util.JsonReader

    [转]Java Code Examples for android.util.JsonReader The following are top voted examples for showing h ...

随机推荐

  1. sublime text3 license

    —– BEGIN LICENSE —– Michael Barnes Single User License EA7E-821385 8A353C41 872A0D5C DF9B2950 AFF6F6 ...

  2. 《剑指offer》第六十二题(圆圈中最后剩下的数字)

    // 面试题62:圆圈中最后剩下的数字 // 题目:0, 1, …, n-1这n个数字排成一个圆圈,从数字0开始每次从这个圆圈里 // 删除第m个数字.求出这个圆圈里剩下的最后一个数字. #inclu ...

  3. Java HashMap 遍历、删除、排序

    首先创建一个map对象,并依次放入几个测试数据 HashMap<String, Integer> map = new HashMap<String, Integer>(); m ...

  4. Xcode打包上传遇到的坑

    1.安装测试包的时候提示APIInternalError ①是否增加了测试设备的UUID ②是否使用adhoc证书打包 2.打包错误:error: couldn't remove '/Users/xx ...

  5. ubuntu18+gtx1060 +cuda9+cudnn-v7+opencv3.1.0 配置深度学习环境

    将笔记本的ubuntu系统更新到18版本后重新配置深度学习环境,在此记载方便日后参考 具体配置为 Ubuntu18.04+gtx1060+opencv-3.1 第1步 安装依赖包 sudo apt-g ...

  6. jq 折面板+tab切换(自己封装的插件哦!!)

    如上图所示的一个折面板效果+tab切换:最重要的js代码如下: 对于布局简单介绍下: hot_wrap_li 这个是带箭头的横条: Arrow 这个是箭头的div:hot_wrap_li_wrap 这 ...

  7. Unity --- 纹理为什么要设置为2的N次方

    1.图片的纹理像素在Unity3D中需要遵循2的N次方,由图形学决定的,只识别2的N次方.   非2的N次方的图片会转化为2的N次方图片(500 x 500 → 512 x 512),是因为转化过程比 ...

  8. 第 8 章 容器网络 - 058 - flannel 概述

    flannel 概述 flannel 是 CoreOS 开发的容器网络解决方案. flannel 为每个 host 分配一个 subnet,容器从此 subnet 中分配 IP,这些 IP 可以在 h ...

  9. 全栈性能测试修炼宝典--Jmeter实战(一)

    性能测试方向职业发展 1.软件测试发展路线 我们可以暂且把软件测试职业路线分为3个方向,分别是业务路线.技术路线.管理路线:4个象限,分别为执行层.中层.中高层过渡.高层. (1)业务路线 常见业务路 ...

  10. nodejs通过request请求远程url的文件并下载到本地

    需要循环去下载远程文件,然后自己写了一个demo,可以直接运行,如下: //文件下载 var fs = require("fs"); var path = require(&quo ...