skip to Main Content

How can you serialize/deserialize AWS Java SDK V2 classes into/from JSON? – Amazon Web Sevices

With the AWS Java SDK V1, all of the classes were normal POJOs with standard getters and setters, so using Jackson you could just serialize/deserialize them easily. Example: TaskDefinition taskDefinition = ecsClient.describeTaskDefinition(new DescribeTaskDefinitionRequest().withTaskDefinition("myTaskDefinition")).getTaskDefinition(); System.out.println(new ObjectMapper().writeValueAsString(taskDefinition)); Result: {"taskDefinitionArn":"...","containerDefinitions":[...]} But when I…

VIEW QUESTION
Back To Top
Search