dynamodb-json icon indicating copy to clipboard operation
dynamodb-json copied to clipboard

Get back the binary datatype for the column

Open maxmithun opened this issue 3 years ago • 0 comments

BINARY datatype is converted to STRING based on the encoding can we identify it back as BINARY

>>> from dynamodb_json import json_util as unmarshall_util
>>> source_json = {"binary_payload":{"B":"QmluYXJ5VmFsdWU="}}
>>> undo = unmarshall_util.loads(source_json)
>>> redo = unmarshall_util.dumps(undo)
>>> print(redo)
{"binary_payload": {"S": "QmluYXJ5VmFsdWU="}}

maxmithun avatar Jul 18 '21 13:07 maxmithun