-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document option to use simplejson #1916
Comments
Sorry if this is a silly question; I'm new to the project (and Python) and want to make sure I understand clearly. I sifted through the issues and IRC history.
Does that accurately summarize why |
I assume that since you intend to document it, you intend to support it? (So if itsdangerous decides to stop using simplejson, flask would continue to support it.) If so, why pull from itsdangerous? Why not just implement in flask itself and be done with it? itsdangerous' code for it is trivial:
This is particularly important to me since simplejson supports I know I'm getting a little off the topic for this issue, but have you considered just making it a dependency instead of making it optional? I had the rather strange experience of observing different behavior for |
What I'm missing here? I installed simplejson and assumed that it would be used instead of json. However, it seems not. I would need simplejson to serialize |
That's not Flask, that's Flask-SQLAlchemy, a separate project. |
This is now mentioned in the installation docs as an optional dependency. |
wait, per what @kblomqvist was saying above, how do you "turn on" simplejson? does this just mean it is a recommendation to use it, or if you install it via pip/pipenv it will automatically be used? found this issue after reading the documentation about optional dependencies and searching what that meant. |
@sentientcucumber You wrote "[simplejson is] More up-to-date than the stdlib implementation.". What do you mean by that? Do you have a source for your claims that simplejson is faster / json has problems (in Python 3.4+)? Or is that maybe outdated? I ran some benchmarks which indicated the speed of json and simplejson is about the same (and simplejson might rather be slower) |
See #3555 |
Flask (through itsdangerous) prefers simplejson over the built-in json module if it is installed. The documentation should say that simplejson is an optional dependency and why using it is preferred but not required.
The text was updated successfully, but these errors were encountered: