[BUG] support deserialize exception?
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
### code
```
public class TestException extends Exception {
public TestException(String message) {
super(message);
}
public static void main(String[] args) {
Exception e = new TestException("test");
byte[] bytes = JSONB.toBytes(e);
Exception newer = JSONB.parseObject(bytes, TestException.class);
System.out.println(newer.getMessage());
}
}
```
then `com.alibaba.fastjson2.JSONException: fieldName not support input type TYPED_ANY -110, offset 1`
Contributor guide
Research direction
Start with JSONB.toBytes and JSONB.parseObject in the supplied Java reproduction, then trace the TYPED_ANY handling reported at offset 1. Done means the TestException round trip succeeds and prints its message without JSONException.
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
- 45/100