android - gson解析"0935"这个会报错?
大家讲道理
大家讲道理 2017-04-17 16:30:23
0
3
623

Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: JSON forbids octal prefixes: 0918 at line 1 column 134

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(3)
巴扎黑

I also use Gson进行json串解析的,没出现过什么问题。你碰到的这个异常是跟json串有关的,先检查一下jsonString to see if it meets the standards.

黄舟

It is treated as an octal number, but it does not conform to the octal number format, so it is treated as a string

Ty80

The string starting with 0 represents octal, but if 9 appears after you, an error will naturally be reported

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template