edelooff / sqlalchemy-json

Full-featured JSON type with mutation tracking for SQLAlchemy
http://variable-scope.com/posts/mutation-tracking-in-nested-json-structures-using-sqlalchemy
BSD 2-Clause "Simplified" License
189 stars 34 forks source link

Feature request: Make NestedMutableJson column values serializable #30

Closed torotil closed 3 years ago

torotil commented 3 years ago

I’d like to dump the content of one of the NestedMutableJson columns into a JSON or YAML file. But this seems to be impossible at the moment. A json.dumps() fails with:

TypeError: Object of type _AssociationDict is not JSON serializable

I think this is also what #14 was trying to ask for.

torotil commented 3 years ago

Never mind. I just found that this wasn’t actually the fault of sqlalchemy-json.