[QUESTION]是否可以自定义序列化transient关键字修饰的属性的默认配置
Open
question
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
### 请描述您的问题
fastjson 2.0.x版本缺省序列化时忽略transient关键字修饰的属性,是否可以自定义默认配置(目的是强制序列化被该关键字修饰的属性)?
类似fastjson 1.x版本的如下配置
```java
JSON.DEFAULT_GENERATE_FEATURE = SerializerFeature.config(JSON.DEFAULT_GENERATE_FEATURE, SerializerFeature.SkipTransientField, false);
```
Contributor guide
Research direction
Start by reviewing fastjson2 2.0.x serialization configuration and how transient fields are handled, then compare the behavior with the fastjson 1.x SerializerFeature.SkipTransientField example. Done means establishing whether an equivalent default configuration exists and documenting the supported way to force serialization, with a Java example or a clearly stated limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100