Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

AWS Development Blog:
DynamoDB JSON and Array Marshaling for PHP
Feb 04, 2015 @ 16:51:30

In the latest post to the AWS PHP Development blog Jeremy Lindblom looks at a new feature of their PHP SDK that allows for more flexibility (and easier handling) when using DynamoDB for document storage in storing more complex data.

Back in October of 2014, Amazon DynamoDB added support for new data types, including the map (M) and list (L) types. These new types, along with some API updates, make it possible to store more complex, multilevel data, and use DynamoDB for document storage.

He talks about a new class thats been added to help work with the DynamoDB storage, the DynamoDb Marshaler (in version >= 2.2.7) that handles the push and pull of the JSON document data directly from the storage, reducing the need to perform the operation manually. He includes code examples of its use and JSON examples of what results are returned on a get request. He also shows how to use it with a native PHP array, translating it with help from the Marshaler and the "marshalItem" method.

tagged: aws development sdk amazon dynamodb json storage marshaler

Link: http://blogs.aws.amazon.com/php/post/Tx3QE1CEXG8QG1Z/DynamoDB-JSON-and-Array-Marshaling-for-PHP


Trending Topics: