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