阅读背景:

是否有一种简单的方法可以判断Android中的任意字符串是否是格式正确的JSON?

来源:互联网 

We're writing an app that communicates with an internet-based CMS in JSON. Unfortunately, some types of network connection e.g. through public Wifi have a web gateway that they require you to go through before you can use the net normally. This means we are trying to JSON parse an HTML webpage. I would expect it to throw an exception stating that the HTML isn't well-formed JSON but instead it tries to parse it, runs out of memory and collapses.We're writing an app that communicates with an




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: