I have got my code working to serialise an object which has Decimal and store in JSON in my PostgreSQL utilising this post here , i am using Flask-SQLAlchemy so have created my own custom apply_driver_hacks method to pass in a json_serializer which will serialise Decimal objects - so all good so far.
However on pulling the data back out , the deserializer loads these values as float. I've searched high and low but can't seem to find any way to reload as Decimal - i can pass in a custom json_deserializer as an option to Flask-SQLAlchemy but cant find a way to pass in any value such as use_decimal=True which is what I would use if using simplejson to load up Json with Decimal .
Any help greatly appreciated !