-
-
Notifications
You must be signed in to change notification settings - Fork 748
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Renderer classes #1092
Renderer classes #1092
Conversation
Hello, this is an interesting work, I like where you are heading. One concern of mine is backward compatibility. People who have Are you planning to address this? Or are you just counting on breakage warning in release notes instead? |
Good point. Both ways have their pros and cons, but I would go for breakage warning (or even throwing |
I was going to suggest we issued deprecation warnings, but I see you went ahead and added the implementation already, excellent. |
Please, go ahead with documentation updates. |
@nicolaiarocci The docs are updated - hopefully I didn't miss anything. 😃 |
Rebased and merged: 80ded9d Thank you! |
* upstream/master: (28 commits) Changelog for pyeve#1114 and pyeve#1115. docs: Use correct name for form-data mime type Olof Johansson docs: Refer to example resources (contacts) consistently kreynen Fixed typo Bump Flask requirement to <=0.13 Fix broken links in documentation/configuration page. Bump version to 0.7.8 Fix breaking syntax error in v0.7.7 Bump version to 0.7.7 Add $geometry and $maxDistance to mongo operators Changelog for pyeve#1092 Updated authors Updated docs Updated docstrings Checking for deprecated features proposal - typo fix Checking for deprecated features proposal PEP8 compliance Updated py2.6 dependencies ...
Hello,
Recently I was working on API which handles a lot of float values in responses. One of the issues I encountered was having NaN values unquoted in the JSON response.
simplejson
allows changing those NaNs to null values in the fly using theignore_nan=True
argument. Eve has already this nice feature that allows using customapp.data.json_encoder_class
but even if the custom JSON encoder class has ignore_nan set toTrue
, that is still ignored and falls back to the default value which isFalse
.My idea is to have new key in the settings called
RENDERERS
. This is a tuple containing module path to Renderer classes. This way developer is allowed to simply extend the default Eve's functionality to new renderers. For example - using ujson, pyYaml.This change is rather big, so I would love to get your feedback on this. If you feel like it's a good idea, I will continue working on it, updating docs and extending docstrings.
Best,
Marcin