android Gson fromJson无法解析,因为空间太大
今天我面临着这个问题,我不知道它是怎么出现的:( 让我们看看我的字符串Jsonandroid Gson fromJson无法解析,因为空间太大,android,gson,Android,Gson,今天我面临着这个问题,我不知道它是怎么出现的:( 让我们看看我的字符串Json <string name="string_config">{ "ip": "0", "text": "TEXT 32", <-- problem here "orientation": "1", "time": "1421831080740" }</string> 让我们看一行:“text”:“text 32” 让“TEXT32”正常运行应用程序 让“文本32”
<string name="string_config">{
"ip": "0",
"text": "TEXT 32", <-- problem here
"orientation": "1",
"time": "1421831080740"
}</string>
让我们看一行:“text”:“text 32”
让“TEXT32”正常运行应用程序
让“文本32”。应用程序中断。
日志:
我确信这个bug是基于“TEXT”和“32”之间的空格
Json字符串不能更改。只有我更改代码才能到达Json
谁能告诉我这个问题。请问题不是因为空格,而是json字符串中有一个错误,缺少逗号(,)
<string name="string_config">{
"ip": "0" <-- here should be comma (,)
"text": "TEXT 32", <-- problem here
"orientation": "1",
"time": "1421831080740"
}</string>
{
“ip”:“0”非常抱歉,我从Json中删除了一些键,因为键值太多:(……请查看更新问题……确认使用此Json正常运行…………仅在将“text”设置为“text 32”时中断。这可能会解决问题
com.google.gson.stream.MalformedJsonException: Expected value at line 1 column 73
<string name="string_config">{
"ip": "0" <-- here should be comma (,)
"text": "TEXT 32", <-- problem here
"orientation": "1",
"time": "1421831080740"
}</string>