How to deal with a large JSON object on Android

前端 未结 6 1949
夕颜
夕颜 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:17

    You could embed your JSON in your app's code as you suggested, but this will be a bad approach if the JSON is dynamic. Then you would need to push an update for your app whenever the JSON changes.

    A better solution would be to paginate the JSON that you generate from your WebService, i.e., break the JSON into smaller parts that you can fetch sequentially in separate API calls.

提交回复
热议问题