[英]Big JSON file - how to compress in the server and decompress in the client side?
我有一個大約2-3 MB的json文件。 當我們發送到客戶端時,我想在服務器端壓縮此json,然后在客戶端解壓縮。
我的客戶端基於AngularJS SPA構建,並從Web API獲取json輸出。
{
"firstName": "John",
"lastName": "Smith",
"age": 25,
"address":
{
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021"
},
"phoneNumber":
[
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "fax",
"number": "646 555-4567"
}
]
}
您可以嘗試在IIS中使用壓縮功能。
另外,考慮使用分頁來獲取部分數據。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.