def METHOD_NAME(cls, app):
    try:
        from .helpers import JSONProvider
        app.json = JSONProvider(app)
    except ImportError:
        from .helpers import JSONEncoder
        app.json_encoder = JSONEncoder