The discussion at json decimal question sounds like the answer but it seems only to work for simple strings. I have a JSON object with lists embedded in it like [Decimal('-9.1'), Decimal('10.1')]. I want it to be simply [9.1,10.1]. I cannot download a library and use it because it has to work in AWS Lambda.
The reason I have this is that AWS DynamoDB requires the Decimal tag.
I found an awkward workaround: traverse the tree that is the dictionary and replace each numeric item with a quoted string. This requires code that knows in detail where the numbers are in the dictionary. Is there a way to store numbers in Dynamo DB objects that is serializable?