-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]这个是?这样不是很奇怪吗? #2093
Labels
bug
Something isn't working
Comments
我是全局配置了dateFormat,但是如果发现是 LocalTime,不应该使用全局dateFormat的时间这部分的格式吗 |
还有一个问题 #2060 2060 这个需求怎么实现? |
wenshao
added a commit
that referenced
this issue
Dec 23, 2023
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.44-SNAPSHOT/ |
@Data
public static class Bean {
@JSONField(format = "HH:mm:ss")
private List<LocalDateTime> times;
@JSONField(format = "HH:mm:ss")
private Map<String, LocalDateTime> timeMap;
}
ObjectWriterProvider provider = new ObjectWriterProvider();
BeanInfo beanInfo = new BeanInfo();
FieldInfo fieldInfo = new FieldInfo();
Class beanClass = Bean.class;
Method method = beanClass.getMethod("getTimes");
provider.getFieldInfo(beanInfo, fieldInfo, beanClass, method); 如上这样的方式可以读取到format |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
version:fastjson2-2.0.43
The text was updated successfully, but these errors were encountered: