Java Code Examples for com.fasterxml.jackson.core.JsonToken#VALUE_NULL

The following examples show how to use com.fasterxml.jackson.core.JsonToken#VALUE_NULL . 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: Bean02BindMap.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * parse with jackson
 */
@Override
public Bean02 parseOnJackson(JsonParser jacksonParser) throws Exception {
  Bean02 instance = new Bean02();
  String fieldName;
  if (jacksonParser.currentToken() == null) {
    jacksonParser.nextToken();
  }
  if (jacksonParser.currentToken() != JsonToken.START_OBJECT) {
    jacksonParser.skipChildren();
    return instance;
  }
  while (jacksonParser.nextToken() != JsonToken.END_OBJECT) {
    fieldName = jacksonParser.getCurrentName();
    jacksonParser.nextToken();

    // Parse fields:
    switch (fieldName) {
        case "id":
          // field id (mapped with "id")
          instance.setId(jacksonParser.getLongValue());
        break;
        case "text":
          // field text (mapped with "text")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.setText(jacksonParser.getText());
          }
        break;
        default:
          jacksonParser.skipChildren();
        break;}
  }
  return instance;
}
 
Example 2
Source File: BidRequestExtReader.java    From openrtb-doubleclick with Apache License 2.0 5 votes vote down vote up
private EventNotificationToken.Builder readEventNotificationToken(JsonParser par) throws IOException {
  EventNotificationToken.Builder token = EventNotificationToken.newBuilder();
  for (startObject(par); endObject(par); par.nextToken()) {
    String fieldName = getCurrentName(par);
    if (par.nextToken() != JsonToken.VALUE_NULL) {
      readEventNotificationTokenField(par, token, fieldName);
    }
  }
  return token;
}
 
Example 3
Source File: Bean2BindMap.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * parse with jackson
 */
@Override
public Bean2 parseOnJacksonAsString(JsonParser jacksonParser) throws Exception {
  Bean2 instance = new Bean2();
  String fieldName;
  if (jacksonParser.getCurrentToken() == null) {
    jacksonParser.nextToken();
  }
  if (jacksonParser.getCurrentToken() != JsonToken.START_OBJECT) {
    jacksonParser.skipChildren();
    return instance;
  }
  while (jacksonParser.nextToken() != JsonToken.END_OBJECT) {
    fieldName = jacksonParser.getCurrentName();
    jacksonParser.nextToken();

    // Parse fields:
    switch (fieldName) {
        case "name":
          // field name (mapped with "name")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.name=jacksonParser.getText();
          }
        break;
        default:
          jacksonParser.skipChildren();
        break;}
  }
  return instance;
}
 
Example 4
Source File: BindBean2SharedPreferences.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * for attribute valueShortSet parsing
 */
protected HashSet<Short> parseValueShortSet(String input) {
  if (input==null) {
    return null;
  }
  KriptonJsonContext context=KriptonBinder.jsonBind();
  try (JacksonWrapperParser wrapper=context.createParser(input)) {
    JsonParser jacksonParser=wrapper.jacksonParser;
    // START_OBJECT
    jacksonParser.nextToken();
    // value of "element"
    jacksonParser.nextValue();
    HashSet<Short> result=null;
    if (jacksonParser.currentToken()==JsonToken.START_ARRAY) {
      HashSet<Short> collection=new HashSet<>();
      Short item=null;
      while (jacksonParser.nextToken() != JsonToken.END_ARRAY) {
        if (jacksonParser.currentToken()==JsonToken.VALUE_NULL) {
          item=null;
        } else {
          item=jacksonParser.getShortValue();
        }
        collection.add(item);
      }
      result=collection;
    }
    return result;
  } catch(Exception e) {
    e.printStackTrace();
    throw(new KriptonRuntimeException(e.getMessage()));
  }
}
 
Example 5
Source File: Bean81GBindMap.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * parse with jackson
 */
@Override
public Bean81G parseOnJacksonAsString(JsonParser jacksonParser) throws Exception {
  Bean81G instance = new Bean81G();
  String fieldName;
  if (jacksonParser.getCurrentToken() == null) {
    jacksonParser.nextToken();
  }
  if (jacksonParser.getCurrentToken() != JsonToken.START_OBJECT) {
    jacksonParser.skipChildren();
    return instance;
  }
  while (jacksonParser.nextToken() != JsonToken.END_OBJECT) {
    fieldName = jacksonParser.getCurrentName();
    jacksonParser.nextToken();

    // Parse fields:
    switch (fieldName) {
        case "valueBigInteger":
          // field valueBigInteger (mapped with "valueBigInteger")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.valueBigInteger=BigIntegerUtils.read(jacksonParser.getText());
          }
        break;
        case "id":
          // field id (mapped with "id")
          instance.id=PrimitiveUtils.readLong(jacksonParser.getText(), 0L);
        break;
        case "valueBigDecimal":
          // field valueBigDecimal (mapped with "valueBigDecimal")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.valueBigDecimal=BigDecimalUtils.read(jacksonParser.getText());
          }
        break;
        default:
          jacksonParser.skipChildren();
        break;}
  }
  return instance;
}
 
Example 6
Source File: BeanDaoImpl.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * for param parser1 parsing
 */
private BeanInner[] parser1(byte[] input) {
  if (input==null) {
    return null;
  }
  KriptonJsonContext context=KriptonBinder.jsonBind();
  try (JacksonWrapperParser wrapper=context.createParser(input)) {
    JsonParser jacksonParser=wrapper.jacksonParser;
    // START_OBJECT
    jacksonParser.nextToken();
    // value of "element"
    jacksonParser.nextValue();
    BeanInner[] result=null;
    if (jacksonParser.currentToken()==JsonToken.START_ARRAY) {
      ArrayList<BeanInner> collection=new ArrayList<>();
      BeanInner item=null;
      while (jacksonParser.nextToken() != JsonToken.END_ARRAY) {
        if (jacksonParser.currentToken()==JsonToken.VALUE_NULL) {
          item=null;
        } else {
          item=beanInnerBindMap.parseOnJackson(jacksonParser);
        }
        collection.add(item);
      }
      result=CollectionUtils.asArray(collection, new BeanInner[collection.size()]);
    }
    return result;
  } catch(Exception e) {
    e.printStackTrace();
    throw(new KriptonRuntimeException(e.getMessage()));
  }
}
 
Example 7
Source File: RelationshipDataDeserializer.java    From katharsis-framework with Apache License 2.0 5 votes vote down vote up
@Override
public Nullable<Object> deserialize(JsonParser jp, DeserializationContext context) throws IOException, JsonProcessingException {
	JsonToken currentToken = jp.getCurrentToken();
	if (currentToken == JsonToken.START_ARRAY) {
		ResourceIdentifier[] resources = jp.readValueAs(ResourceIdentifier[].class);
		return Nullable.of((Object) Arrays.asList(resources));
	} else if (currentToken == JsonToken.VALUE_NULL) {
		return Nullable.of(null);
	} else if (currentToken == JsonToken.START_OBJECT) {
		return Nullable.of((Object) jp.readValueAs(ResourceIdentifier.class));
	}
	throw new IllegalStateException(currentToken.toString());
}
 
Example 8
Source File: Bean01Table.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * for attribute temp parsing
 */
public static List<String> parseTemp(byte[] input) {
  if (input==null) {
    return null;
  }
  KriptonJsonContext context=KriptonBinder.jsonBind();
  try (JacksonWrapperParser wrapper=context.createParser(input)) {
    JsonParser jacksonParser=wrapper.jacksonParser;
    // START_OBJECT
    jacksonParser.nextToken();
    // value of "element"
    jacksonParser.nextValue();
    List<String> result=null;
    if (jacksonParser.currentToken()==JsonToken.START_ARRAY) {
      ArrayList<String> collection=new ArrayList<>();
      String item=null;
      while (jacksonParser.nextToken() != JsonToken.END_ARRAY) {
        if (jacksonParser.currentToken()==JsonToken.VALUE_NULL) {
          item=null;
        } else {
          item=jacksonParser.getText();
        }
        collection.add(item);
      }
      result=collection;
    }
    return result;
  } catch(Exception e) {
    e.printStackTrace();
    throw(new KriptonRuntimeException(e.getMessage()));
  }
}
 
Example 9
Source File: GeoBindMap.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * parse with jackson
 */
@Override
public Geo parseOnJacksonAsString(JsonParser jacksonParser) throws Exception {
  Geo instance = new Geo();
  String fieldName;
  if (jacksonParser.getCurrentToken() == null) {
    jacksonParser.nextToken();
  }
  if (jacksonParser.getCurrentToken() != JsonToken.START_OBJECT) {
    jacksonParser.skipChildren();
    return instance;
  }
  while (jacksonParser.nextToken() != JsonToken.END_OBJECT) {
    fieldName = jacksonParser.getCurrentName();
    jacksonParser.nextToken();

    // Parse fields:
    switch (fieldName) {
        case "lat":
          // field lat (mapped with "lat")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.lat=jacksonParser.getText();
          }
        break;
        case "lng":
          // field lng (mapped with "lng")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.lng=jacksonParser.getText();
          }
        break;
        default:
          jacksonParser.skipChildren();
        break;}
  }
  return instance;
}
 
Example 10
Source File: Bean81GBindMap.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * parse with jackson
 */
@Override
public Bean81G parseOnJackson(JsonParser jacksonParser) throws Exception {
  Bean81G instance = new Bean81G();
  String fieldName;
  if (jacksonParser.currentToken() == null) {
    jacksonParser.nextToken();
  }
  if (jacksonParser.currentToken() != JsonToken.START_OBJECT) {
    jacksonParser.skipChildren();
    return instance;
  }
  while (jacksonParser.nextToken() != JsonToken.END_OBJECT) {
    fieldName = jacksonParser.getCurrentName();
    jacksonParser.nextToken();

    // Parse fields:
    switch (fieldName) {
        case "valueBigInteger":
          // field valueBigInteger (mapped with "valueBigInteger")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.valueBigInteger=BigIntegerUtils.read(jacksonParser.getText());
          }
        break;
        case "id":
          // field id (mapped with "id")
          instance.id=jacksonParser.getLongValue();
        break;
        case "valueBigDecimal":
          // field valueBigDecimal (mapped with "valueBigDecimal")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.valueBigDecimal=BigDecimalUtils.read(jacksonParser.getText());
          }
        break;
        default:
          jacksonParser.skipChildren();
        break;}
  }
  return instance;
}
 
Example 11
Source File: FloatBeanTable.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * for attribute value2 parsing
 */
public static LinkedList<Float> parseValue2(byte[] input) {
  if (input==null) {
    return null;
  }
  KriptonJsonContext context=KriptonBinder.jsonBind();
  try (JacksonWrapperParser wrapper=context.createParser(input)) {
    JsonParser jacksonParser=wrapper.jacksonParser;
    // START_OBJECT
    jacksonParser.nextToken();
    // value of "element"
    jacksonParser.nextValue();
    LinkedList<Float> result=null;
    if (jacksonParser.currentToken()==JsonToken.START_ARRAY) {
      LinkedList<Float> collection=new LinkedList<>();
      Float item=null;
      while (jacksonParser.nextToken() != JsonToken.END_ARRAY) {
        if (jacksonParser.currentToken()==JsonToken.VALUE_NULL) {
          item=null;
        } else {
          item=jacksonParser.getFloatValue();
        }
        collection.add(item);
      }
      result=collection;
    }
    return result;
  } catch(Exception e) {
    e.printStackTrace();
    throw(new KriptonRuntimeException(e.getMessage()));
  }
}
 
Example 12
Source File: NameBindMap.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * parse with jackson
 */
@Override
public Name parseOnJackson(JsonParser jacksonParser) throws Exception {
  Name instance = new Name();
  String fieldName;
  if (jacksonParser.currentToken() == null) {
    jacksonParser.nextToken();
  }
  if (jacksonParser.currentToken() != JsonToken.START_OBJECT) {
    jacksonParser.skipChildren();
    return instance;
  }
  while (jacksonParser.nextToken() != JsonToken.END_OBJECT) {
    fieldName = jacksonParser.getCurrentName();
    jacksonParser.nextToken();

    // Parse fields:
    switch (fieldName) {
        case "first":
          // field first (mapped with "first")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.first=jacksonParser.getText();
          }
        break;
        case "last":
          // field last (mapped with "last")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.last=jacksonParser.getText();
          }
        break;
        default:
          jacksonParser.skipChildren();
        break;}
  }
  return instance;
}
 
Example 13
Source File: BindBean2SharedPreferences.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * for attribute valueBeanSet parsing
 */
protected LinkedHashSet<Bean> parseValueBeanSet(String input) {
  if (input==null) {
    return null;
  }
  KriptonJsonContext context=KriptonBinder.jsonBind();
  try (JacksonWrapperParser wrapper=context.createParser(input)) {
    JsonParser jacksonParser=wrapper.jacksonParser;
    // START_OBJECT
    jacksonParser.nextToken();
    // value of "element"
    jacksonParser.nextValue();
    LinkedHashSet<Bean> result=null;
    if (jacksonParser.currentToken()==JsonToken.START_ARRAY) {
      LinkedHashSet<Bean> collection=new LinkedHashSet<>();
      Bean item=null;
      while (jacksonParser.nextToken() != JsonToken.END_ARRAY) {
        if (jacksonParser.currentToken()==JsonToken.VALUE_NULL) {
          item=null;
        } else {
          item=beanBindMap.parseOnJackson(jacksonParser);
        }
        collection.add(item);
      }
      result=collection;
    }
    return result;
  } catch(Exception e) {
    e.printStackTrace();
    throw(new KriptonRuntimeException(e.getMessage()));
  }
}
 
Example 14
Source File: BindBeanSharedPreferences.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * for attribute valueLongArray parsing
 */
protected Long[] parseValueLongArray(String input) {
  if (input==null) {
    return null;
  }
  KriptonJsonContext context=KriptonBinder.jsonBind();
  try (JacksonWrapperParser wrapper=context.createParser(input)) {
    JsonParser jacksonParser=wrapper.jacksonParser;
    // START_OBJECT
    jacksonParser.nextToken();
    // value of "element"
    jacksonParser.nextValue();
    Long[] result=null;
    if (jacksonParser.currentToken()==JsonToken.START_ARRAY) {
      ArrayList<Long> collection=new ArrayList<>();
      Long item=null;
      while (jacksonParser.nextToken() != JsonToken.END_ARRAY) {
        if (jacksonParser.currentToken()==JsonToken.VALUE_NULL) {
          item=null;
        } else {
          item=jacksonParser.getLongValue();
        }
        collection.add(item);
      }
      result=CollectionUtils.asLongArray(collection);
    }
    return result;
  } catch(Exception e) {
    e.printStackTrace();
    throw(new KriptonRuntimeException(e.getMessage()));
  }
}
 
Example 15
Source File: BindBean64SharedPreferences.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * for attribute valueCharArray parsing
 */
protected Character[] parseValueCharArray(String input) {
  if (input==null) {
    return null;
  }
  KriptonJsonContext context=KriptonBinder.jsonBind();
  try (JacksonWrapperParser wrapper=context.createParser(input)) {
    JsonParser jacksonParser=wrapper.jacksonParser;
    // START_OBJECT
    jacksonParser.nextToken();
    // value of "element"
    jacksonParser.nextValue();
    Character[] result=null;
    if (jacksonParser.currentToken()==JsonToken.START_ARRAY) {
      ArrayList<Character> collection=new ArrayList<>();
      Character item=null;
      while (jacksonParser.nextToken() != JsonToken.END_ARRAY) {
        if (jacksonParser.currentToken()==JsonToken.VALUE_NULL) {
          item=null;
        } else {
          item=Character.valueOf((char)jacksonParser.getIntValue());
        }
        collection.add(item);
      }
      result=CollectionUtils.asCharacterArray(collection);
    }
    return result;
  } catch(Exception e) {
    e.printStackTrace();
    throw(new KriptonRuntimeException(e.getMessage()));
  }
}
 
Example 16
Source File: IntDaoImpl.java    From kripton with Apache License 2.0 5 votes vote down vote up
/**
 * for param parser2 parsing
 */
private Integer[] parser2(byte[] input) {
  if (input==null) {
    return null;
  }
  KriptonJsonContext context=KriptonBinder.jsonBind();
  try (JacksonWrapperParser wrapper=context.createParser(input)) {
    JsonParser jacksonParser=wrapper.jacksonParser;
    // START_OBJECT
    jacksonParser.nextToken();
    // value of "element"
    jacksonParser.nextValue();
    Integer[] result=null;
    if (jacksonParser.currentToken()==JsonToken.START_ARRAY) {
      ArrayList<Integer> collection=new ArrayList<>();
      Integer item=null;
      while (jacksonParser.nextToken() != JsonToken.END_ARRAY) {
        if (jacksonParser.currentToken()==JsonToken.VALUE_NULL) {
          item=null;
        } else {
          item=jacksonParser.getIntValue();
        }
        collection.add(item);
      }
      result=CollectionUtils.asIntegerArray(collection);
    }
    return result;
  } catch(Exception e) {
    e.printStackTrace();
    throw(new KriptonRuntimeException(e.getMessage()));
  }
}
 
Example 17
Source File: PhoneNumberBindMap.java    From kripton with Apache License 2.0 4 votes vote down vote up
/**
 * parse with jackson
 */
@Override
public PhoneNumber parseOnJackson(JsonParser jacksonParser) throws Exception {
  PhoneNumber instance = new PhoneNumber();
  String fieldName;
  if (jacksonParser.currentToken() == null) {
    jacksonParser.nextToken();
  }
  if (jacksonParser.currentToken() != JsonToken.START_OBJECT) {
    jacksonParser.skipChildren();
    return instance;
  }
  while (jacksonParser.nextToken() != JsonToken.END_OBJECT) {
    fieldName = jacksonParser.getCurrentName();
    jacksonParser.nextToken();

    // Parse fields:
    switch (fieldName) {
        case "actionType":
          // field actionType (mapped with "actionType")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            String tempEnum=jacksonParser.getText();
            instance.actionType=StringUtils.hasText(tempEnum)?ActionType.valueOf(tempEnum):null;
          }
        break;
        case "contactId":
          // field contactId (mapped with "contactId")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.contactId=jacksonParser.getText();
          }
        break;
        case "contactName":
          // field contactName (mapped with "contactName")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.contactName=jacksonParser.getText();
          }
        break;
        case "countryCode":
          // field countryCode (mapped with "countryCode")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.countryCode=jacksonParser.getText();
          }
        break;
        case "id":
          // field id (mapped with "id")
          instance.id=jacksonParser.getLongValue();
        break;
        case "number":
          // field number (mapped with "number")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.number=jacksonParser.getText();
          }
        break;
        default:
          jacksonParser.skipChildren();
        break;}
  }
  return instance;
}
 
Example 18
Source File: CommentBindMap.java    From kripton with Apache License 2.0 4 votes vote down vote up
/**
 * parse with jackson
 */
@Override
public Comment parseOnJackson(JsonParser jacksonParser) throws Exception {
  Comment instance = new Comment();
  String fieldName;
  if (jacksonParser.currentToken() == null) {
    jacksonParser.nextToken();
  }
  if (jacksonParser.currentToken() != JsonToken.START_OBJECT) {
    jacksonParser.skipChildren();
    return instance;
  }
  while (jacksonParser.nextToken() != JsonToken.END_OBJECT) {
    fieldName = jacksonParser.getCurrentName();
    jacksonParser.nextToken();

    // Parse fields:
    switch (fieldName) {
        case "body":
          // field body (mapped with "body")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.body=jacksonParser.getText();
          }
        break;
        case "email":
          // field email (mapped with "email")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.email=jacksonParser.getText();
          }
        break;
        case "id":
          // field id (mapped with "id")
          instance.id=jacksonParser.getLongValue();
        break;
        case "name":
          // field name (mapped with "name")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            instance.name=jacksonParser.getText();
          }
        break;
        case "postId":
          // field postId (mapped with "postId")
          instance.postId=jacksonParser.getLongValue();
        break;
        default:
          jacksonParser.skipChildren();
        break;}
  }
  return instance;
}
 
Example 19
Source File: Bean87A_3BindMap.java    From kripton with Apache License 2.0 4 votes vote down vote up
/**
 * parse with jackson
 */
@Override
public Bean87A_3 parseOnJacksonAsString(JsonParser jacksonParser) throws Exception {
  Bean87A_3 instance = new Bean87A_3();
  String fieldName;
  if (jacksonParser.getCurrentToken() == null) {
    jacksonParser.nextToken();
  }
  if (jacksonParser.getCurrentToken() != JsonToken.START_OBJECT) {
    jacksonParser.skipChildren();
    return instance;
  }
  while (jacksonParser.nextToken() != JsonToken.END_OBJECT) {
    fieldName = jacksonParser.getCurrentName();
    jacksonParser.nextToken();

    // Parse fields:
    switch (fieldName) {
        case "attributeBoolean":
          // field attributeBoolean (mapped with "attributeBoolean")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            // using type adapter bind.feature.typeadapter.kripton87.BooleanByteArrayTypeAdapter
            instance.attributeBoolean=TypeAdapterUtils.toJava(BooleanByteArrayTypeAdapter.class, PrimitiveUtils.readLong(jacksonParser.getText(), null));
          }
        break;
        case "elementBoolean":
          // field elementBoolean (mapped with "elementBoolean")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            // using type adapter bind.feature.typeadapter.kripton87.BooleanByteArrayTypeAdapter
            instance.elementBoolean=TypeAdapterUtils.toJava(BooleanByteArrayTypeAdapter.class, PrimitiveUtils.readLong(jacksonParser.getText(), null));
          }
        break;
        case "elementEnum":
          // field elementEnum (mapped with "elementEnum")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            // using type adapter bind.feature.typeadapter.kripton87.Enum87IntegerTypeAdapter
            instance.elementEnum=TypeAdapterUtils.toJava(Enum87IntegerTypeAdapter.class, PrimitiveUtils.readInteger(jacksonParser.getText(), null));
          }
        break;
        case "dataBoolean":
          // field dataBoolean (mapped with "dataBoolean")
          if (jacksonParser.currentToken()!=JsonToken.VALUE_NULL) {
            // using type adapter bind.feature.typeadapter.kripton87.BooleanByteArrayTypeAdapter
            instance.dataBoolean=TypeAdapterUtils.toJava(BooleanByteArrayTypeAdapter.class, PrimitiveUtils.readLong(jacksonParser.getText(), null));
          }
        break;
        default:
          jacksonParser.skipChildren();
        break;}
  }
  return instance;
}
 
Example 20
Source File: JrsNull.java    From jackson-jr with Apache License 2.0 4 votes vote down vote up
@Override
public JsonToken asToken() {
    return JsonToken.VALUE_NULL;
}