code: def jsonify(*args, **kwargs):
      
      return Response(
          json.dumps(
              dict(
                  *args,
                  **kwargs),
              cls=MongoJSONEncoder),
          mimetype='application/json')
docs: jsonify with support for MongoDB ObjectId