我有一個巨大的JSON文件要傳輸到CSV。我在互聯網上搜索了很多東西,我試圖自己寫Python,但沒有任何作用。我一直在這裏呆了一個星期。任何人都可以幫助我嗎? json的文件格式是:轉換巨大的JSON文件,CSV文件
{"Gid": "5999043768223797248",
"rights": [{"grantorContext": "Freemium right added by Netlife", "sku": "CMO-STO-2-FREE", "rightId": "5340e29a6dc01000", "grantorId": "NETLIFE_B2C"}],
"used_quota": "16.95",
"creationtime": "2001-04-29 12:58:33",
"devices": [{"last_connection": "2001-05-30 22:06:08", "os_version": "4.2.2", "auto_upload": "wifi", "last_upload": "2002-04-29 13:12:26", "device_name": "i-mobile i-STYLE 7.5", "platform": "unknow", "client_version": "2.0.0"}],
"total_quota": 2.0,
"Uid": ["666927729520"]}
{"Gid": "5999043740151320576",
"rights": [{"grantorContext": "Freemium right added by Netlife", "sku": "CMO-STO-2-FREE", "rightId": "5340e29f72c05000", "grantorId": "NETLIFE_B2C"},
{"grantorContext": null, "sku": "CMO-STO-25-M", "rightId": "53b5d2d8b0400000", "grantorId": "DTN"}],
"used_quota": "480.85",
"creationtime": "2001-04-29 12:58:38",
"devices": [{"last_connection": "2001-08-02 03:46:05", "os_version": "8.4", "auto_upload": "wifi", "last_upload": "2015-08-02 03:46:05", "device_name": "Nokia", "platform": "unknow", "client_version": "1.0.0"}],
"total_quota": 27.0,
"Uid": ["465949097714"]}
{"Gid": "5999043675907166208",
"rights": [{"grantorContext": null, "sku": "CMO-STO-25-M", "rightId": "53b5d2e161000000", "grantorId": "DTN"},
{"grantorContext": "Freemium right added by Netlife", "sku": "CMO-STO-2-FREE", "rightId": "5340e29b42805000", "grantorId": "NETLIFE_B2C"}],
"used_quota": "8.26",
"creationtime": "2001-04-29 12:58:35",
"devices": [{"last_connection": "2001-04-29 13:08:24", "os_version": "4.2.2", "auto_upload": "wifi", "last_upload": "2002-04-29 13:03:25", "device_name": "Nokia V797", "platform": "unknow", "client_version": "2.0.0"}],
"total_quota": 27.0,
"Uid": ["666994575443"]}
如果沒有任何工作,儘管你嘗試了一切,那麼我們都註定失敗,世界即將結束。但是後來我對此表示懷疑,所以請張貼一些你的嘗試,並解釋發生了什麼,以及應該做什麼。 –
如果您從一個小JSON文件開始編寫程序將其轉換爲CSV,那麼這將是解決您的巨大問題的一個步驟? – barny
JSON文件有多大? – Cyphase