mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 04:59:21 +08:00
refactor(json/jackson): 重构 JSON 工具类
- 修改了 JSONUtils 类的多个方法名称,使其更加清晰 - 添加了新的方法来处理 JSON 数组转换 - 优化了异常处理,引入了专门的 JSONException 类 - 调整了部分方法的参数和返回类型,提高灵活性
This commit is contained in:
@@ -346,8 +346,8 @@ public class ServletUtils extends JakartaServletUtil {
|
||||
* @since 2.13.1
|
||||
* @see #write(HttpServletResponse, String, String)
|
||||
*/
|
||||
public static void writeJSON(HttpServletResponse response, Object data) {
|
||||
write(response, JSONUtil.toJsonStr(data), MediaType.APPLICATION_JSON_VALUE);
|
||||
public static void writeJSON(HttpServletResponse response, String data) {
|
||||
write(response, data, MediaType.APPLICATION_JSON_VALUE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user