-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
Description
Hi!
I faced up with a problem in kubernetes python client kubernetes-client/python#2196.
This client use openapi-generator. For str responses that looks like a good json we have a bad transformation:
{"a": "a"} \\ valid json string
comes to
{'a': 'a'} \\ not validThe reason for this in this line:
Line 340 in 1fbf722
| data = json.loads(response.data) |
There we have
response_type == 'str'
response.data == '{"a": "a"}'This is a valid json, so after L340:
data == {'a': 'a'} # this is a dict object in python (no more string)Then self.__deserialize_primitive transforms this dict to string:
return klass(data) # where klass == str, data = {'a': 'a'} In python str(dict(a="a")) == {'a': 'a'}
So, after this transformations double quotes replaced by ordinary quotes.
Reactions are currently unavailable