-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RestAPI: CustomJSONEncoder support bytes objects
In Aiida 2.0, REST (where flask 1 was updated to flask 2), bytes objects are not supported anymore. Because Flask 1.x was based on simplejson, that inherently converts bytes objects into strings. In flask 2.0.0, it was redesigned based on the default python json. See here: https://flask.palletsprojects.com/en/2.0.x/changes/ and here pallets/flask#3555 The conversion of a bytes array into `str` in the `CustomJSONEncoder` is implemented to workaround. Co-authored-by: Jusong Yu <jusong.yeu@gmail.com> Cherry-pick: ef9c544
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters