alibaba / alibaba/fastjson2

[BUG] Deserialization to JSONObject when using SortedMap

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

Description

xxxObject {
private SortedMap ackSampleConfig;
}

it works if the `SortedMap` is `Map`, otherwise classcastException throws.

Contributor guide

Open the contributing guide

Research direction

Start by creating a minimal reproduction from the issue's object containing SortedMap and compare deserialization with Map. Trace the SortedMap handling until the ClassCastException is identified; done means the SortedMap case deserializes successfully like the Map case.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.