I struggled with this for a while, after all, you need to use a map.
UpdateItemOutcome updateItemOutcome = table.updateItem(
new UpdateItemSpec()
.withPrimaryKey("id", "yourId")
.withUpdateExpression("SET document.field = :field")
.withValueMap(new ValueMap()
.withMap(":field", "map of key value pairs that will get serialized to json")));
source
share