OutOfMemoryError when using Gson to parse a large JSON response

前端 未结 3 1115
深忆病人
深忆病人 2021-02-10 22:42
URL url = new URL(\"http://pubapi.cryptsy.com/api.php?method=orderdatav2\");
CryptsyCurrencyPairsReturn response = gson.fromJson(new InputStreamReader(url.openStream()),         


        
3条回答
  •  既然无缘
    2021-02-10 23:01

    I'd recommend looking at JsonReader (API 11+), or the other options as recommended here.

提交回复
热议问题