-
Notifications
You must be signed in to change notification settings - Fork 541
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedquestionFurther information is requestedFurther information is requested
Milestone
Description
`
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import java.util.Date;
@DaTa
public class TestOrder {
@JSONField(format = "HH:mm:ss")
private Date saleEndTime;
public static void main(String[] args) {
String s = "{\"saleEndTime\": \"23:00:00\"}";
TestOrder order = JSON.parseObject(s, TestOrder.class);
System.out.println(JSON.toJSONString(order));
}
}
从fastjson升级到2.0.52后执行以上代码时,出现报错:
Text '23:00:00' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {},ISO resolved to 23:00 of type java.time.format.Parsed`
请问我该如何解决该问题?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedquestionFurther information is requestedFurther information is requested