@Override public Object getEmbeddedObject() throws IOException { return delegate.getEmbeddedObject(); } @Override public byte[] getBinaryValue(Base64Variant b64variant) throws IOException { return delegate.getBinaryValue(b64variant); }
@Override public Object getEmbeddedObject() throws IOException { return delegate.getEmbeddedObject(); } @Override public byte[] getBinaryValue(Base64Variant b64variant) throws IOException { return delegate.getBinaryValue(b64variant); }
@Override public Object getEmbeddedObject() throws IOException { return delegate.getEmbeddedObject(); } @Override public byte[] getBinaryValue(Base64Variant b64variant) throws IOException { return delegate.getBinaryValue(b64variant); }
@Override public Date unmarshall(JsonUnmarshallerContext context) throws Exception { return (Date) context.getJsonParser().getEmbeddedObject(); }
@Override public ByteBuffer unmarshall(JsonUnmarshallerContext context) throws Exception { return (ByteBuffer) context.getJsonParser().getEmbeddedObject(); }
public BigInteger unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { JsonParser parser = unmarshallerContext.getJsonParser(); JsonToken current = parser.getCurrentToken(); if (current == JsonToken.VALUE_NUMBER_INT) { return parser.getBigIntegerValue(); } else if (current == JsonToken.VALUE_EMBEDDED_OBJECT) { Object embedded = parser.getEmbeddedObject(); return new BigInteger((byte[]) embedded); } else { throw new SdkClientException("Invalid BigInteger Format."); } }
@Override public ZonedDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { switch (jsonParser.currentToken()) { case VALUE_EMBEDDED_OBJECT: final Object embeddedObject = jsonParser.getEmbeddedObject(); if (embeddedObject instanceof Date) { final Date date = (Date) embeddedObject; return ZonedDateTime.ofInstant(date.toInstant(), ZoneOffset.UTC); } else { throw new IllegalStateException("Unsupported token: " + jsonParser.currentToken()); } case VALUE_STRING: final String text = jsonParser.getText(); return ZonedDateTime.parse(text, FORMATTER).withZoneSameInstant(ZoneOffset.UTC); default: throw new IllegalStateException("Unsupported token: " + jsonParser.currentToken()); } } }
@Override public DateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { switch (jsonParser.currentToken()) { case VALUE_EMBEDDED_OBJECT: final Object embeddedObject = jsonParser.getEmbeddedObject(); if (embeddedObject instanceof Date) { final Date date = (Date) embeddedObject; return new DateTime(date, DateTimeZone.UTC); } else { throw new IllegalStateException("Unsupported token: " + jsonParser.currentToken()); } case VALUE_STRING: final String text = jsonParser.getText(); return DateTime.parse(text, FORMATTER).withZone(DateTimeZone.UTC); default: throw new IllegalStateException("Unsupported token: " + jsonParser.currentToken()); } } }
protected final JsonNode _fromEmbedded(JsonParser p, DeserializationContext ctxt, JsonNodeFactory nodeFactory) throws IOException { Object ob = p.getEmbeddedObject(); if (ob == null) { // should this occur? return nodeFactory.nullNode(); } Class<?> type = ob.getClass(); if (type == byte[].class) { // most common special case return nodeFactory.binaryNode((byte[]) ob); } // [databind#743]: Don't forget RawValue if (ob instanceof RawValue) { return nodeFactory.rawValueNode((RawValue) ob); } if (ob instanceof JsonNode) { // [databind#433]: but could also be a JsonNode hiding in there! return (JsonNode) ob; } // any other special handling needed? return nodeFactory.pojoNode(ob); } }
Object ob = p.getEmbeddedObject(); if (ob == null) { return null;
Object ob = p.getEmbeddedObject(); if (ob == null) { return null;
Object ob = p.getEmbeddedObject(); if (ob == null) return null; if (ob instanceof char[]) {
return p.getEmbeddedObject(); case JsonTokenId.ID_STRING: return p.getText();
@Override public MonthDay deserialize(JsonParser parser, DeserializationContext context) throws IOException { if (parser.hasToken(JsonToken.VALUE_STRING)) { String string = parser.getValueAsString().trim(); try { if (_formatter == null) { return MonthDay.parse(string); } return MonthDay.parse(string, _formatter); } catch (DateTimeException e) { return _handleDateTimeException(context, e, string); } } if (parser.hasToken(JsonToken.VALUE_EMBEDDED_OBJECT)) { return (MonthDay) parser.getEmbeddedObject(); } if (parser.hasToken(JsonToken.START_ARRAY)){ return _deserializeFromArray(parser, context); } return _handleUnexpectedToken(context, parser, JsonToken.VALUE_STRING, JsonToken.VALUE_NUMBER_INT); } }
Object value = p.getEmbeddedObject(); if (value != null) { if (!_beanType.isTypeOrSuperTypeOf(value.getClass())) {
return Boolean.FALSE; case JsonTokenId.ID_EMBEDDED_OBJECT: return p.getEmbeddedObject();
Object ob = p.getEmbeddedObject(); if (ob == null) return null; if (ob instanceof byte[]) {
return p.getEmbeddedObject();
return p.getEmbeddedObject(); case JsonTokenId.ID_STRING: if (_stringDeserializer != null) {
return finishBuild(ctxt, deserializeFromDouble(p, ctxt)); case JsonTokenId.ID_EMBEDDED_OBJECT: return p.getEmbeddedObject(); case JsonTokenId.ID_TRUE: case JsonTokenId.ID_FALSE: