Editing
Comparison of common data file formats in Mandarin
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== 4. JSON 檔案 === JSON 檔案:適合複雜格式或者說自由風格的欄位定義。曾經拿到包含多筆資料,約 250 MB 檔案大小的 JSON 檔案。因為發生檔案讀取錯誤,需要額外切割檔案內容。 JSON 格式本身沒有筆數上限,瓶頸是讀取時必須將整個檔案載入記憶體,因此檔案愈大愈容易發生記憶體不足的錯誤。<ref>Quora — What is the practical limit on the size of a JSON message?: https://www.quora.com/What-is-the-practical-limit-on-the-size-of-a-JSON-message-for-an-internet-application</ref> 實務上建議不要將多筆資料寫在 JSON,而改成 JSONL,也就是 JSON 加上換行符號區別多筆資料。適合使用程式用串流方式逐行讀取,而不致於發生記憶體錯誤。
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information