In a project that keeps data inside a MongoDB and that also exposes some data via a (read-only) RESTish JSON API, dealing with Python objects requires some extra work. Serialization and Deserializing only works automatically when dealing with dicts or other simple types like string.In a project that keeps data inside a MongoDB a