python requests json returns single quote

Python uses single or double quotes for strings. By default, it'll display single quote for strings. However, JSON specification only consider double quotes to mark strings.

Note that requests' response.json() will return native Python types which are slightly different from their JSON representation you can see with response.content.


What you can however is to add

jsonresponse=json.dump(requests.get(xxx).json())

in order to get valid json in jsonresponse.


The json() method doesn't actually return JSON. It returns a python object (read: dictionary) that contains the same information as the json data. When you print it out, the quotes are added for the sake of readability, they are not actually in your data.

Should I care about it or not?

Not.