alibaba / alibaba/fastjson2

fastjson tojsonString 序列化对象顺序被打乱

Open
#1,202 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

不想使用注解@JSONField 方式在字段上面, 因为字段很多很麻烦 SerializeConfig 中有方法可以处理这种方式 或者SerializerFeature可以处理吗? 使用的版本是 com.alibaba:fastjson:1.2.15

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the object-ordering behavior with fastjson 1.2.15, then inspect the mentioned SerializeConfig and SerializerFeature APIs for ordering support. Done means serialization preserves the intended object field order without requiring @JSONField annotations.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.