List of usage examples for com.fasterxml.jackson.core JsonParser nextTextValue
public String nextTextValue() throws IOException, JsonParseException
From source file:ren.hankai.cordwood.jackson.DateTimeDeserializerTest.java
@Test public void testDeserializeInvalidDate() throws Exception { final ObjectMapper om = new ObjectMapper(); final DateTimeDeserializer des = new DateTimeDeserializer(); final JsonParser jp = om.getFactory().createParser("{\"date\": \"20180901 13:23|12\"}"); String val = null; do {//from ww w .j av a 2s. c om val = jp.nextTextValue(); } while (val == null); final Date date = des.deserialize(jp, om.getDeserializationContext()); Assert.assertNull(date); }