List of usage examples for com.fasterxml.jackson.core JsonParser getText
public abstract String getText() throws IOException, JsonParseException;
From source file:org.openscoring.common.OpTypeDeserializer.java
@Override public OpType deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException { return OpType.fromValue(parser.getText()); }
From source file:org.openscoring.common.DataTypeDeserializer.java
@Override public DataType deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException { return DataType.fromValue(parser.getText()); }
From source file:org.springframework.social.facebook.api.impl.json.RsvpStatusDeserializer.java
@Override public RsvpStatus deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { String normalizedStatus = jp.getText().toUpperCase(); if (normalizedStatus.equals("UNSURE")) { normalizedStatus = "MAYBE"; }//from ww w . j a v a2 s. c o m return RsvpStatus.valueOf(normalizedStatus); }
From source file:org.springframework.social.betaseries.api.impl.json.BSObjectTypeDeserializer.java
@Override public BSObjectType deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { return BSObjectType.valueOf(jp.getText().toUpperCase()); }
From source file:org.springframework.social.betaseries.api.impl.json.BSPictureTypeDeserializer.java
@Override public BSPictureType deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { return BSPictureType.valueOf(jp.getText().toUpperCase()); }
From source file:com.heisenberg.impl.json.LocalDateTimeDeserializer.java
@Override public LocalDateTime deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { String timeString = jp.getText(); if (timeString != null) { return formatter.parseLocalDateTime(timeString); } else {//w w w .j av a2 s . co m return null; } }
From source file:jp.xet.baseunits.jackson2.CalendarDateDeserializer.java
@Override public CalendarDate deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { try {//from w w w. j av a 2 s . c o m return CalendarDate.parse(jp.getText(), format); } catch (ParseException e) { return null; } }
From source file:org.mayocat.rest.jackson.LocaleBCP47LanguageTagDeserializer.java
@Override public Locale deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { String str = jsonParser.getText().trim(); if (Strings.isNullOrEmpty(str)) { return null; }/*from w ww . j av a2s . c o m*/ return Locale.forLanguageTag(str); }
From source file:org.openscoring.common.MiningFunctionDeserializer.java
@Override public MiningFunction deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException { return MiningFunction.fromValue(parser.getText()); }
From source file:jp.xet.baseunits.jackson2.CalendarMonthDeserializer.java
@Override public CalendarMonth deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { try {/*from ww w.j a va 2 s .c o m*/ return CalendarMonth.parse(jp.getText(), format); } catch (ParseException e) { return null; } }