Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deal with a large JSON object on Android

I'm making an Android app that runs a ASP.NET WebService. Webservice sends a JSON object and app parses the object and displays on the screen. In one case, JSON object is too big and I get Failed Binder Transaction error. My solution is to get that JSON object and embed it in the app code, so that it wouldn't need to get that JSON object from the server. Can you tell any other things that I can do for this problem? Or can you tell me how to get that JSON object from Webservice? Thanks.

like image 842
jason Avatar asked Jan 26 '16 09:01

jason


People also ask

How do I reduce the size of a JSON file?

Compressing with gzip As text data, JSON data compresses nicely. That's why gzip is our first option to reduce the JSON data size. Moreover, it can be automatically applied in HTTP, the common protocol for sending and receiving JSON.

How do I open a big JSON file?

With Gigasheet, you can open large JSON files with millions of rows or billions of cells, and work with them just as easily as you'd work with a much smaller file in Excel or Google Sheets. In one spot, the JSON data is loaded, flattened, and ready for analysis.

Is there any limit for JSON data?

How large can JSON Documents be? One of the more frequently asked questions about the native JSON data type, is what size can a JSON document be. The short answer is that the maximum size is 1GB.


1 Answers

Sending the large size data from server to mobile. JSON is light weight. If you want to pass the data using more efficient way then passes it in pagination. If you want to use more lighter protocol than JSON then implement the below google protocol which are really useful, which are supporting major languages. Below are smaller Serialised data structure. Google's data interchange protocol.

1.Google Protocol

2.Flat Buffers

3.Nano-proto buffers

Hope this will be useful you.

like image 200
Maheshwar Ligade Avatar answered Sep 17 '22 12:09

Maheshwar Ligade