Force every Mapping (dict, etc...) keys be string after encoding, because in other way mongo will throw
bson.errors.InvalidDocument: documents must have only string keys, key was <key>.
This needs for normal encoding dicts like dict[uuid.UUID, datetime.datetime].
Force every
Mapping
(dict, etc...) keys be string after encoding, because in other way mongo will throwbson.errors.InvalidDocument: documents must have only string keys, key was <key>
.This needs for normal encoding dicts like
dict[uuid.UUID, datetime.datetime]
.