@Override public BigDecimal unmarshall(JsonUnmarshallerContext context) throws Exception { return context.getJsonParser().getDecimalValue(); }
@Override public Float unmarshall(JsonUnmarshallerContext context) throws Exception { return context.getJsonParser().getFloatValue(); }
@Override public Short unmarshall(JsonUnmarshallerContext context) throws Exception { return context.getJsonParser().getShortValue(); }
public Float unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { return unmarshallerContext.getJsonParser().getFloatValue(); }
public Date unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { return new Date(unmarshallerContext.getJsonParser().getLongValue()); }
@Override public Integer unmarshall(JsonUnmarshallerContext context) throws Exception { return context.getJsonParser().getIntValue(); }
@Override public BigInteger unmarshall(JsonUnmarshallerContext context) throws Exception { return context.getJsonParser().getBigIntegerValue(); }
@Override public Date unmarshall(JsonUnmarshallerContext context) throws Exception { return (Date) context.getJsonParser().getEmbeddedObject(); }
@Override public Double unmarshall(JsonUnmarshallerContext context) throws Exception { return context.getJsonParser().getDoubleValue(); }
@Override public Long unmarshall(JsonUnmarshallerContext context) throws Exception { return context.getJsonParser().getLongValue(); }
@Override public Byte unmarshall(JsonUnmarshallerContext context) throws Exception { return context.getJsonParser().getByteValue(); }
@Override public ByteBuffer unmarshall(JsonUnmarshallerContext context) throws Exception { return (ByteBuffer) context.getJsonParser().getEmbeddedObject(); }
public Double unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { return unmarshallerContext.getJsonParser().getDoubleValue(); }
@Override public Boolean unmarshall(JsonUnmarshallerContext context) throws Exception { return context.getJsonParser().getBooleanValue(); }
public Integer unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { return unmarshallerContext.getJsonParser().getIntValue(); }
public Long unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { return unmarshallerContext.getJsonParser().getLongValue(); }
public ByteBuffer unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { return ByteBuffer.wrap(unmarshallerContext.getJsonParser().getBinaryValue()); }
public Short unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { return unmarshallerContext.getJsonParser().getShortValue(); }
public BigDecimal unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { JsonParser parser = unmarshallerContext.getJsonParser(); Unmarshaller<BigInteger, JsonUnmarshallerContext> bigIntegerUnmarshaller = unmarshallerContext.getUnmarshaller(BigInteger.class); JsonToken current = parser.getCurrentToken(); if (current != JsonToken.START_ARRAY) { throw new SdkClientException("Invalid BigDecimal Format."); } parser.nextToken(); int exponent = parser.getIntValue(); parser.nextToken(); BigInteger mantissa = bigIntegerUnmarshaller.unmarshall(unmarshallerContext); return new BigDecimal(mantissa, exponent); }
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."); } }