{"id":16671389,"url":"https://github.com/bluefeet/aws-dynamodb-attributeconversion","last_synced_at":"2026-05-28T19:02:30.972Z","repository":{"id":66888875,"uuid":"48259608","full_name":"bluefeet/AWS-DynamoDB-AttributeConversion","owner":"bluefeet","description":"Adjust Perl data structures to be compatible with AWS' DynamoDB API.","archived":false,"fork":false,"pushed_at":"2015-12-29T17:45:05.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T08:34:13.508Z","etag":null,"topics":["in-development","perl5"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluefeet.png","metadata":{"files":{"readme":"README.pod","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-18T22:37:50.000Z","updated_at":"2019-03-06T05:37:08.000Z","dependencies_parsed_at":"2023-03-16T13:45:31.104Z","dependency_job_id":null,"html_url":"https://github.com/bluefeet/AWS-DynamoDB-AttributeConversion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bluefeet/AWS-DynamoDB-AttributeConversion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FAWS-DynamoDB-AttributeConversion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FAWS-DynamoDB-AttributeConversion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FAWS-DynamoDB-AttributeConversion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FAWS-DynamoDB-AttributeConversion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluefeet","download_url":"https://codeload.github.com/bluefeet/AWS-DynamoDB-AttributeConversion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluefeet%2FAWS-DynamoDB-AttributeConversion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33622070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["in-development","perl5"],"created_at":"2024-10-12T11:44:18.497Z","updated_at":"2026-05-28T19:02:30.942Z","avatar_url":"https://github.com/bluefeet.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"=pod\n\n=head1 NAME\n\nAWS::DynamoDB::ItemTransformer - Convert Perl data structures to and\nfrom AWS DynamoDB item attributes.\n\n=head1 SYNOPSIS\n\n    use AWS::DynamoDB::ItemTransformer;\n    \n    my %ddb_item = encode_ddb_item( foo =\u003e 32 );\n    my %item = decode_ddb_item( foo =\u003e { N =\u003e '32' } );\n    \n    my $ddb_value = encode_ddb_value( 32 );\n    my $value = decode_ddb_value( { N =\u003e '32' } );\n    \n    # Or, using the OO interface:\n    my $item_transformer = AWS::DynamoDB::ItemTransformer-\u003enew();\n    \n    my %ddb_item = $item_transformer-\u003eencode_item( foo =\u003e 32 );\n    my %item = $item_transformer-\u003edecode_item( foo =\u003e { N =\u003e 32 } );\n    \n    my $ddb_value = $item_transformer-\u003eencode_value( 32 );\n    my $value = $item_transformer-\u003edecode_value( { N =\u003e 32 } );\n\n=head1 DESCRIPTION\n\nDynamoDB items have an explicit data type syntax.  This module makes\nit easy to convert plain scalars, arrays, and hashes into the structure\nthat is needed to store your data in, and retrieve your data from, DynamoDB.\n\nMore information can be found at\nL\u003chttp://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html\u003e.\n\nThis module has both a functional interface, which provides the default\nfeature set, as well as an OO interface which allows for the use\nof plugins to provide advanced functionality.\n\n=head1 PLUGINS\n\nAt this time available plugins include:\n\n=over\n\n=item *\n\nL\u003cAWS::DynamoDB::ItemTransformer::boolean\u003e\n\n=item *\n\nL\u003cAWS::DynamoDB::ItemTransformer::Set::Object\u003e\n\n=item *\n\nL\u003cAWS::DynamoDB::ItemTransformer::Paws\u003e\n\n=back\n\n=head1 DATA TYPES\n\nPerl does not have native data types for all the data types which DynamoDB\nsupports.  Due to this some \"dumbing down\" of the data types happen when\nthey are thawed.  For example, these:\n\n    { B=\u003e'a' },\n    { BS=\u003e['a','b','c'] },\n    { BOOL=\u003e1 },\n    { SS=\u003e['a','b','c'] },\n\nall encode to:\n\n    'a',\n    ['a', 'b', 'c'],\n    1,\n    ['a', 'b', 'c'],\n\nand will decode back to:\n\n    { S=\u003e'a' },\n    { L=\u003e['a','b','c'] },\n    { N=\u003e1 },\n    { L=\u003e['a','b','c'] },\n\nAlternatively you can use various plugins to alter this behavior, such\nas L\u003cAWS::DynamoDB::ItemTransformer::boolean\u003e which adds support for\nencoding and decoding L\u003cboolean\u003e objects as the C\u003cBOOL\u003e data type.\n\n=head1 EXPORTED\n\n=head2 encode_ddb_item\n\n    my %ddb_item = encode_ddb_item( foo =\u003e 32 );\n    # foo =\u003e { N =\u003e '32' }\n\nTake a hash of key value pairs and returns a hash with the values\npassed through L\u003c/encode_ddb_value\u003e.  The returned hash is usually\nused with the C\u003cPutItem\u003e API.\n\n=head2 decode_ddb_item\n\n    my %item = decode_ddb_item( foo =\u003e {N =\u003e '32'} );\n    # foo =\u003e 32\n\nTakes an item hash, usually returned by the C\u003cGetItem\u003e API, and\nreturns a new hash with the item values passed through\nL\u003c/decode_ddb_value\u003e.\n\n=head2 encode_ddb_value\n\n    my $ddb_value = encode_ddb_value( 32 );\n    # { N =\u003e '32' }\n\nTakes a plain scalar, hashref, or arrayref, and returns a new data\nstructure marked up and ready to be sent to AWS (usually to the\nC\u003cPutItem\u003e API).\n\n=head2 decode_ddb_value\n\n    my $value = decode_ddb_value( {N =\u003e '32'} );\n    # 32\n\nTakes an AWS attribute value hash ref and returns the equivalent\nPerl data structure.\n\n=head1 METHODS\n\n=head2 encode_item\n\nThis is the OO equivalent of L\u003c/encode_ddb_item\u003e.\n\n=head2 decode_item\n\nThis is the OO equivalent of L\u003c/decode_ddb_item\u003e.\n\n=head2 encode_value\n\nThis is the OO equivalent of L\u003c/encode_ddb_value\u003e.\n\n=head2 decode_value\n\nThis is the OO equivalent of L\u003c/decode_ddb_value\u003e.\n\n=head2 is_numeric\n\nReturns true if the passed scalar is numeric.  Whether a scalar\nis numeric is determined by looking at the SV flags for the scalar.\n\nThis is used by L\u003c/encode_value\u003e to determine if a non-ref value is\na string (S) or number (N).\n\n=head1 AUTHOR\n\nAran Clary Deltac \u003cbluefeetE\u003c64\u003egmail.com\u003e\n\n=head1 ACKNOWLEDGEMENTS\n\nThanks to L\u003cZipRecruiter|https://www.ziprecruiter.com/\u003e\nfor encouraging their employees to contribute back to the open\nsource ecosystem.  Without their dedication to quality software\ndevelopment this distribution would not exist.\n\n=head1 LICENSE\n\nThis library is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself.\n\n=cut\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluefeet%2Faws-dynamodb-attributeconversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluefeet%2Faws-dynamodb-attributeconversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluefeet%2Faws-dynamodb-attributeconversion/lists"}