如何处理在Android上的大型JSON对象 [英] How to deal with a large JSON object on Android

查看:115
本文介绍了如何处理在Android上的大型JSON对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个运行ASP.NET web服务的Andr​​oid应用程序。 Web服务发送一个JSON对象,并应用解析屏幕上的对象和显示器。在一个案例中,JSON对象是太大了,我也得到失败的活页夹事务错误。我的解决办法就是获得一个JSON对象并将其嵌入应用程序code,所以它不会需要从服务器得到JSON对象。你能告诉任何其他的东西,我可以为这个问题呢?
或者你可以告诉我怎么去从web服务的JSON对象?谢谢你。

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.

推荐答案

发送在大尺寸从服务器到移动数据。 JSON是重量轻。
如果你想通过使用数据更有效的方式然后将其传递分页。
如果你想使用比JSON更轻协议,然后执行下面的谷歌协议,它是真正有用的,这是支持主要语言。
下面是较小Serialised数据结构。谷歌的数据交换协议。

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协议

2.Flat缓冲器

3.Nano,原缓冲区

希望这将是有益的你。

这篇关于如何处理在Android上的大型JSON对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆