Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

com.alibaba.fastjson.JSONException: Invalid long: "2016-11-10T11:40:42.4Z" #987

Closed
lifelikejuly opened this issue Jan 8, 2017 · 5 comments
Labels

Comments

@lifelikejuly
Copy link

在retrofit使用.addConverterFactory(FastJsonConverterFactory.create())出现的问题
解析字段 "createdAt": "2016-11-09T09:57:20.445Z",当Z前为三位时可以解析,如果为一位则解析失败报异常。
即使在字段上加上注解也没用@JSONField(format = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")

@wenshao wenshao added the bug label Jan 9, 2017
@wenshao
Copy link
Member

wenshao commented Jan 9, 2017

android环境么?

@lifelikejuly
Copy link
Author

是的

@wenshao
Copy link
Member

wenshao commented Jan 9, 2017

为什么会有这样的需求?

@lifelikejuly
Copy link
Author

我是在调用GankIo的公用接口时发现这个问题的,Api作者应该是用了ISO 8601扩展格式吧

@wenshao wenshao added this to the 1.1.55.android milestone Jan 11, 2017
@wenshao
Copy link
Member

wenshao commented Jan 11, 2017

已经支持,在1.1.55.android和1.2.24版本中都会修复此问题,预计在春节前发布新版本

@wenshao wenshao closed this as completed Jan 15, 2017
asa1997 pushed a commit to Be-Secure/fastjson that referenced this issue Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants