piskvorky / sqlitedict

Persistent dict, backed by sqlite3 and pickle, multithread-safe.
Apache License 2.0
1.17k stars 131 forks source link

Custom serialization #65

Closed erosennin closed 7 years ago

erosennin commented 7 years ago

This PR adds the ability to customize the serialization of values by passing custom encode and decode functions to SqliteDict. Possible use cases are storing values as JSON, applying compression, etc.

tmylk commented 7 years ago

Thanks for the new feature! Could you please add text to README in the bottom of Features section on how to use json and compression?

erosennin commented 7 years ago

Sure, done.