Flask2.3.X JSONEncoder deprecated
In Flask2.3.X, flask.json module deprecated JSONEncoder class, override_json_encoder is not working now.
It will raise ImportError: cannot import name 'JSONEncoder' from 'flask.json'
in the meantime, pinning flask == 2.2.5 helps.
Yeap, can confirm the same problem.
I think that this could be helpful
https://github.com/MongoEngine/flask-mongoengine/pull/537
EDIT: This fork can be helpful https://pypi.org/project/flask-mongoengine-3/
json_encoder and json_decoder attributes on app and blueprint, and the corresponding json.JSONEncoder and JSONDecoder classes, are removed from Flask version 2.3.0.
So, it shows JSONEncoder = json.JSONEncoder AttributeError: module 'flask.json' has no attribute 'JSONEncoder'
For more refer: https://flask.palletsprojects.com/en/2.3.x/changes/#version-2-3-0
#537
downgrading to flask==2.2.5 worked for me! No longer getting this error
Is this a bug that will be fixed or are we to use @idoshr fork going forward. I think downgrading isn't the solution.