yuluo-yx opened a new issue, #1760:
URL: https://github.com/apache/rocketmq-dashboard/issues/1760
**BUG REPORT**
1. Please describe the issue you observed:
- What did you do (the steps to reproduce)?
Call `JsonUtil.string2Obj` with a valid pretty-printed JSON document, for
example:
```java
JsonUtil.string2Obj("{\n \"value\": 1\n}", Map.class);
```
The same preprocessing path can be observed by passing a multiline value
with `String.class`.
- What did you expect to see?
Jackson should parse structural JSON whitespace normally, and a requested
String value should be returned without modification.
- What did you see instead?
`JsonUtil` replaces carriage returns and line feeds with literal escape
characters before deserialization. The pretty-printed document becomes invalid
JSON and returns null; multiline String values are silently changed.
2. Please tell us about your environment:
- apache/rocketmq-dashboard master
- baseline commit `770822bbc812bfd0c2a94aa0128ab6f59b50d076`
- JDK 17
3. Other information:
The preprocessing is not needed because Jackson already handles legal JSON
whitespace and escaped newlines. Removing it preserves valid inputs while
continuing to reject non-standard JSON string literals.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]