Open emelois opened 7 years ago
Does this behavior persist if you assign an empty list or tuple? Looking through the code, it appears that the intent is to remove NoneType values and empty lists/tuples, but not empty dicts. However, if the v1 behavior was to remove empty dicts as well, I can continue to look into this. Thanks!
You're right, it seems to be the case only for empty dicts. I confirm that they were removed in v1.
@bradfriedman anything new on this?
Brad is no longer on the team.
Anyone any news about this?
Le mer. 8 nov. 2017 22:33, Rose Davidson notifications@github.com a écrit :
Brad is no longer on the team.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cloudendpoints/endpoints-python/issues/39#issuecomment-342967155, or mute the thread https://github.com/notifications/unsubscribe-auth/ADVmx0Ll_YIlqyeoIFbGdw3DAtedWP2sks5s0h4dgaJpZM4Lspe8 .
I have only just seen this issue. I will look into it.
+1 any news on this? I am experiencing the same behavior.
I think we've noticed a behavior which is not backward compatible with endpoints v1.
In v1, when the app is deployed (does not happen on the dev server), all empty values (None, (), {}, []) are removed from messages by the endpoints lib.
For instance :
d = {} d['first'] = 'one' d['two'] = {}
is transformed in {"first": "one"} in v1 and in {"first": "one", "two": {}} in v2.
Is this by design or is it a bug that will be fixed?
Here is the monkey patch we use: