티스토리 뷰

728x90
pip3 install seunggabi_core_python​
from seunggabi_core_python.util import json_util

json_util.pretty("{'User-Agent': 'python-requests/2.25.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'Content-Length': '40'}")

https://stackoverflow.com/questions/4162642/single-vs-double-quotes-in-json/76950751#76950751

 

Single vs double quotes in JSON

My code: import simplejson as json s = "{'username':'dfdsfdsf'}" #1 #s = '{"username":"dfdsfdsf"}' #2 j = json.loads(s) #1 definition is wrong #2 definition is right I heard that in Python that

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[sh] kill defunct process (zombie)  (0) 2023.08.27
[sh] install crontab by sh  (0) 2023.08.27
[github] actions set-python  (0) 2023.08.26
[github] `$GITHUB_OUTPUT`  (0) 2023.08.26
[Spring] MessageSource  (0) 2023.08.20
댓글