新聞中心
一、JSON介紹

創(chuàng)新互聯(lián)建站是網(wǎng)站建設(shè)專家,致力于互聯(lián)網(wǎng)品牌建設(shè)與網(wǎng)絡(luò)營(yíng)銷,專業(yè)領(lǐng)域包括成都網(wǎng)站制作、網(wǎng)站建設(shè)、電商網(wǎng)站制作開(kāi)發(fā)、小程序制作、微信營(yíng)銷、系統(tǒng)平臺(tái)開(kāi)發(fā),與其他網(wǎng)站設(shè)計(jì)及系統(tǒng)開(kāi)發(fā)公司不同,我們的整合解決方案結(jié)合了恒基網(wǎng)絡(luò)品牌建設(shè)經(jīng)驗(yàn)和互聯(lián)網(wǎng)整合營(yíng)銷的理念,并將策略和執(zhí)行緊密結(jié)合,且不斷評(píng)估并優(yōu)化我們的方案,為客戶提供全方位的互聯(lián)網(wǎng)品牌整合方案!
JSON表示JAVA小號(hào)scriptobjectn浮選是以一種有組織且簡(jiǎn)單的方式存儲(chǔ)信息的。當(dāng)瀏覽器與服務(wù)器之間進(jìn)行數(shù)據(jù)交換時(shí),數(shù)據(jù)必須是文本格式。
二、JSON字符串轉(zhuǎn)換python
1.使用以下代碼示例
import json
people_string = '''
{
"people":[
{
"emp_name": "John smith",
"emp_no.": "924367-567-23",
"emp_email": ["[email protected]"],
"has_license": "false"
},
{
"emp_name": "harshit kant",
"emp_number": "560-555-5153",
"emp_email": "null",
"has_license": "true"
}
]
}
'''
data = json.loads(people_string)
print(data)2.輸出
3.打印數(shù)據(jù)類型
import json
people_string = '''
{
"people":[
{
"emp_name": "John smith",
"emp_no.": "924367-567-23",
"emp_email": ["[email protected]"],
"has_license": "false"
},
{
"emp_name": "harshit kant",
"emp_number": "560-555-5153",
"emp_email": "null",
"has_license": "true"
}
]
}
'''
data = json.loads(people_string)
print(type(data)) #prints the datatype輸出:
JSON相關(guān)知識(shí)點(diǎn)學(xué)習(xí)推薦閱讀:
json和python字典區(qū)別
關(guān)于python中的Json模塊用法及介紹
新聞名稱:創(chuàng)新互聯(lián)Python教程:JSON字符串如何轉(zhuǎn)換成Python?
當(dāng)前路徑:http://m.fisionsoft.com.cn/article/cojjjsj.html


咨詢
建站咨詢
