How to deal with a large JSON object on Android

前端 未结 6 1951
夕颜
夕颜 2020-12-17 16:37

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 t

6条回答
  •  一个人的身影
    2020-12-17 17:08

    Preferably try to break the Json Object to smaller object and get from webService ,

    or get data in parts and if u cant do that

    You have to use a streaming JSON parser. For Android u can use these 2:

    1. GSON

    2. Jackson

    GSON Streaming is explained at: https://sites.google.com/site/gson/streaming

    I personally like Gson .

提交回复
热议问题