@Retention(value=RUNTIME) @Target(value={TYPE,FIELD,METHOD}) public @interface DynamoDBTypeConvertedJson
It shares all limitations of that library. For more information about Jackson, see: http://wiki.fasterxml.com/JacksonHome
@DynamoDBTypeConvertedJson public Currency getCurrency()
Where,
public class Currency { private Double amount; private String unit; public Double getAmount() { return amount; } public void setAmount(Double amount) { this.amount = amount; } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } }
Would write the following value to DynamoDB given,
Currency(79.99,"USD")
= "{\"amount\":79.99,\"unit\":\"USD\"}"
DynamoDBTypeConverted
Modifier and Type | Optional Element and Description |
---|---|
Class<? extends Object> |
targetType
The value type to use when calling the JSON mapper's
readValue ;
a value of Void.class indicates to use the getter's type. |
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.