I wrote a SON manipulator to encode some custom objects in mongo after http://api.mongodb.org/python/current/examples/custom_type.html . This works great for encoding and decoding objects on the way to and from the collection, but as far as I can tell, there is no way to use it in the request. If I try to execute a query using an object that can be encoded using the manipulator, I get the same cannot encode object error that you will get if you try to directly insert the object without using the manipulator. However, I can explicitly request if I manually encode the object in the request. Is there a neat way to use the SON manipulator in queries without resorting to manually encoding an object?
source share