Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
LemonWiki共筆
Search
Search
Appearance
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Comparison of common data file formats in Mandarin
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
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)