當前位置: 首頁>>代碼示例>>Java>>正文


Java JsonParser.skipChildren方法代碼示例

本文整理匯總了Java中com.fasterxml.jackson.core.JsonParser.skipChildren方法的典型用法代碼示例。如果您正苦於以下問題:Java JsonParser.skipChildren方法的具體用法?Java JsonParser.skipChildren怎麽用?Java JsonParser.skipChildren使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.fasterxml.jackson.core.JsonParser的用法示例。


在下文中一共展示了JsonParser.skipChildren方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public ExternalModel parse(JsonParser jsonParser) throws IOException {
  ExternalModel instance = new ExternalModel();
  if (jsonParser.getCurrentToken() == null) {
    jsonParser.nextToken();
  }
  if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
    jsonParser.skipChildren();
    return null;
  }
  while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
    String fieldName = jsonParser.getCurrentName();
    jsonParser.nextToken();
    parseField(instance, fieldName, jsonParser);
    jsonParser.skipChildren();
  }
  return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:ExternalModel$$JsonObjectMapper.java

示例2: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public SimpleGenericModel<T> parse(JsonParser jsonParser) throws IOException {
  SimpleGenericModel<T> instance = new SimpleGenericModel<T>();
  if (jsonParser.getCurrentToken() == null) {
    jsonParser.nextToken();
  }
  if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
    jsonParser.skipChildren();
    return null;
  }
  while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
    String fieldName = jsonParser.getCurrentName();
    jsonParser.nextToken();
    parseField(instance, fieldName, jsonParser);
    jsonParser.skipChildren();
  }
  return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:SimpleGenericModel$$JsonObjectMapper.java

示例3: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public NonPrivateFieldsFieldDetectionPolicyModel parse(JsonParser jsonParser) throws IOException {
    NonPrivateFieldsFieldDetectionPolicyModel instance = new NonPrivateFieldsFieldDetectionPolicyModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:NonPrivateFieldsFieldDetectionPolicyModel$$JsonObjectMapper.java

示例4: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public NonPrivateFieldsAndAccessorsFieldDetectionPolicyModel parse(JsonParser jsonParser) throws IOException {
    NonPrivateFieldsAndAccessorsFieldDetectionPolicyModel instance = new NonPrivateFieldsAndAccessorsFieldDetectionPolicyModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:NonPrivateFieldsAndAccessorsFieldDetectionPolicyModel$$JsonObjectMapper.java

示例5: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public MultipleFieldNamesModel parse(JsonParser jsonParser) throws IOException {
    MultipleFieldNamesModel instance = new MultipleFieldNamesModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:MultipleFieldNamesModel$$JsonObjectMapper.java

示例6: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public ParentModel parse(JsonParser jsonParser) throws IOException {
    ParentModel instance = new ParentModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:ParentModel$$JsonObjectMapper.java

示例7: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public SimpleWrapperModel parse(JsonParser jsonParser) throws IOException {
    SimpleWrapperModel instance = new SimpleWrapperModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:SimpleWrapperModel$$JsonObjectMapper.java

示例8: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public LowerCaseNamingPolicyModel parse(JsonParser jsonParser) throws IOException {
    LowerCaseNamingPolicyModel instance = new LowerCaseNamingPolicyModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:LowerCaseNamingPolicyModel$$JsonObjectMapper.java

示例9: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public PrivateFieldModel parse(JsonParser jsonParser) throws IOException {
    PrivateFieldModel instance = new PrivateFieldModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:PrivateFieldModel$$JsonObjectMapper.java

示例10: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public SimpleGenericModelWithExtends<T> parse(JsonParser jsonParser) throws IOException {
  SimpleGenericModelWithExtends<T> instance = new SimpleGenericModelWithExtends<T>();
  if (jsonParser.getCurrentToken() == null) {
    jsonParser.nextToken();
  }
  if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
    jsonParser.skipChildren();
    return null;
  }
  while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
    String fieldName = jsonParser.getCurrentName();
    jsonParser.nextToken();
    parseField(instance, fieldName, jsonParser);
    jsonParser.skipChildren();
  }
  return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:SimpleGenericModelWithExtends$$JsonObjectMapper.java

示例11: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public PrePostProcessingModel parse(JsonParser jsonParser) throws IOException {
    PrePostProcessingModel instance = new PrePostProcessingModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    instance.onParseComplete();
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:20,代碼來源:PrePostProcessingModel$$JsonObjectMapper.java

示例12: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public WhitespaceFieldNameModel parse(JsonParser jsonParser) throws IOException {
  WhitespaceFieldNameModel instance = new WhitespaceFieldNameModel();
  if (jsonParser.getCurrentToken() == null) {
    jsonParser.nextToken();
  }
  if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
    jsonParser.skipChildren();
    return null;
  }
  while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
    String fieldName = jsonParser.getCurrentName();
    jsonParser.nextToken();
    parseField(instance, fieldName, jsonParser);
    jsonParser.skipChildren();
  }
  return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:WhitespaceFieldNameModel$$JsonObjectMapper.java

示例13: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public SimpleModel parse(JsonParser jsonParser) throws IOException {
    SimpleModel instance = new SimpleModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:SimpleModel$$JsonObjectMapper.java

示例14: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public NestedCollectionModel parse(JsonParser jsonParser) throws IOException {
    NestedCollectionModel instance = new NestedCollectionModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:NestedCollectionModel$$JsonObjectMapper.java

示例15: parse

import com.fasterxml.jackson.core.JsonParser; //導入方法依賴的package包/類
@Override
public SimpleCollectionModel parse(JsonParser jsonParser) throws IOException {
    SimpleCollectionModel instance = new SimpleCollectionModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:19,代碼來源:SimpleCollectionModel$$JsonObjectMapper.java


注:本文中的com.fasterxml.jackson.core.JsonParser.skipChildren方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。