alibaba / alibaba/fastjson2

json里有两个相似的key,成员变量只有其一,json转对象会出现问题[QUESTION]

Open
#1,382 2 comments 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

### 请描述您的问题
*询问有关本项目的使用和其他方面的相关问题。*
class A{
add_time;
}
JSON:{"addtime":xxxxxxx,"add_time":xxxxxxxx},
转换的时候 总会把addtime的值给class A,
但是class A {
addtime;
add_time;
}
就会正常 会把addtime给A的addtime,release最新,
我用源码试了一下 没有这个问题,从maven拉下来的 会出现上述问题

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported conversion with class A and the JSON containing both addtime and add_time, comparing the Maven artifact with the source release mentioned in the issue. Identify the relevant deserialization entry point and add_time handling, then verify whether the packaged and source versions behave differently. Done means the behavior is explained and a regression test covers the confirmed result.

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.