Closed qianshangding closed 4 years ago
机器是mac,难道和文件的类型有关?
机器是mac,难道和文件的类型有关?
与 fastjson 版本版本有关
fastjson使用了最新的1.2.58,还是报同样的错误。
com.alibaba.fastjson.JSONException: syntax error, expect {, actual error, pos 0, fastjson-version 1.2.58 at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:489) at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.parseRest(JavaBeanDeserializer.java:1537) at com.alibaba.fastjson.parser.deserializer.FastjsonASMDeserializer_1_MetaData.deserialze(Unknown Source) at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:284) at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:689) at com.alibaba.fastjson.JSON.parseObject(JSON.java:378) at com.alibaba.fastjson.JSON.parseObject(JSON.java:282) at com.alibaba.fastjson.JSON.parseObject(JSON.java:555) at net.ipip.ipdb.Reader.init(Reader.java:53) at net.ipip.ipdb.Reader.<init>(Reader.java:25) at net.ipip.ipdb.Reader.<init>(Reader.java:21) at net.ipip.ipdb.City.<init>(City.java:17)
fastjson使用了最新的1.2.58,还是报同样的错误。
com.alibaba.fastjson.JSONException: syntax error, expect {, actual error, pos 0, fastjson-version 1.2.58 at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:489) at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.parseRest(JavaBeanDeserializer.java:1537) at com.alibaba.fastjson.parser.deserializer.FastjsonASMDeserializer_1_MetaData.deserialze(Unknown Source) at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:284) at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:689) at com.alibaba.fastjson.JSON.parseObject(JSON.java:378) at com.alibaba.fastjson.JSON.parseObject(JSON.java:282) at com.alibaba.fastjson.JSON.parseObject(JSON.java:555) at net.ipip.ipdb.Reader.init(Reader.java:53) at net.ipip.ipdb.Reader.
fastjson使用了最新的1.2.58,还是报同样的错误。 com.alibaba.fastjson.JSONException: syntax error, expect {, actual error, pos 0, fastjson-version 1.2.58 at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:489) at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.parseRest(JavaBeanDeserializer.java:1537) at com.alibaba.fastjson.parser.deserializer.FastjsonASMDeserializer_1_MetaData.deserialze(Unknown Source) at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:284) at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:689) at com.alibaba.fastjson.JSON.parseObject(JSON.java:378) at com.alibaba.fastjson.JSON.parseObject(JSON.java:282) at com.alibaba.fastjson.JSON.parseObject(JSON.java:555) at net.ipip.ipdb.Reader.init(Reader.java:53) at net.ipip.ipdb.Reader.(Reader.java:25) at net.ipip.ipdb.Reader.(Reader.java:21) at net.ipip.ipdb.City.(City.java:17)
maven打包有没有做变量${XX}替换?有可能把ip库文件里的相同字符串给替换了
Maven版本:
采用免费版本的库-ipipfree.ipdb,报错: com.alibaba.fastjson.JSONException: syntax error, expect {, actual error, pos 0 at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:154) at com.alibaba.fastjson.parser.deserializer.ASMJavaBeanDeserializer.parseRest(ASMJavaBeanDeserializer.java:96) at Fastjson_ASM_MetaData_1.deserialze(Unknown Source) at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:513) at com.alibaba.fastjson.JSON.parseObject(JSON.java:243) at com.alibaba.fastjson.JSON.parseObject(JSON.java:219) at com.alibaba.fastjson.JSON.parseObject(JSON.java:178) at com.alibaba.fastjson.JSON.parseObject(JSON.java:322) at net.ipip.ipdb.Reader.init(Reader.java:53) at net.ipip.ipdb.Reader.(Reader.java:25)
at net.ipip.ipdb.Reader.(Reader.java:21)
at net.ipip.ipdb.BaseStation.(BaseStation.java:17)
使用收费版本库-ipip.ipdb,报错: net.ipip.ipdb.InvalidDatabaseException: database file size error at net.ipip.ipdb.Reader.init(Reader.java:58) at net.ipip.ipdb.Reader.(Reader.java:25)
at net.ipip.ipdb.Reader.(Reader.java:21)
at net.ipip.ipdb.BaseStation.(BaseStation.java:17)
QQ加不进去,急,在线等~