alibaba / alibaba/fastjson2

[FEATURE]使用toJsonString打印时间时怎么打印时间戳呢

Open
#595 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

当一个对象里面包含Date类型时使用toJSONString时我想和fastjson1一样打印时间戳,而不是默认的时间格式。

Contributor guide

Open the contributing guide

Research direction

Start by reading the toJSONString API and the existing Date serialization behavior in fastjson2, then compare it with the fastjson1 timestamp output mentioned in the issue. The change is complete when an object containing a Date can be serialized as a timestamp instead of the default formatted time, with coverage for the resulting JSON.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.