amazon-archives / aws-sdk-react-native

AWS SDK for React Native (developer preview)
Apache License 2.0
631 stars 68 forks source link

Any documentation for PutItem? #55

Open Jaafar-abusair opened 7 years ago

Jaafar-abusair commented 7 years ago

I'm trying to use PutItem like the following

var params = { TableName: "

", Item: { userId: "1", name: "jaafar" } };

AWSDynamoDB.PutItem(params).then((response) => {
  console.debug("Success");
  console.debug(response);
}).catch((error) => {
  console.debug("failed");
  console.debug(error);
});

and im getting this

{ [Error: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 64 path $.Item.] 04-27 13:35:19.832 6937 7049 D ReactNativeJS: framesToPop: 1, 04-27 13:35:19.832 6937 7049 D ReactNativeJS: code: 'EUNSPECIFIED', 04-27 13:35:19.832 6937 7049 D ReactNativeJS: line: 19400, 04-27 13:35:19.832 6937 7049 D ReactNativeJS: column: 29, 04-27 13:35:19.832 6937 7049 D ReactNativeJS: sourceURL: 'http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false' }