Convert DynamoJson to something compatible with the Dynamo client

1k Views Asked by At

I've got a big dump of DynamoJson e.g.

{"Item": {"id":{"N":"896"},  "name": {"S": "Tom"}}}

I want to parse this JSON and put it to my DynamoDB table...

I've tried:

import com.amazonaws.services.dynamodbv2.document.Item;
Item item = Item.fromJSON(BLOB);

But unfortunately its not smart enough to parse the DynamoDB Json format and doesn't deal with the inner types (S, N etc)... When I try to put I get errors like:

Type mismatch for key id expected: N actual: M

Related Questions:

AWS DynamoDB on Android: Inserting JSON Directly? This does not work for the DynamoJson format.

Unmarshall DynamoDB JSON This is exactly what I need but its in NodeJS

0

There are 0 best solutions below