KJB_ROOTLESS_ARRAY -> kjbrootlessarray

This commit is contained in:
cho
2026-01-10 18:58:51 +09:00
parent b4d501438b
commit 50a1ae727d
2 changed files with 3 additions and 3 deletions
@@ -45,7 +45,7 @@ public class ApiRequestBodyFilter extends OncePerRequestFilter {
// 3. 예제: ROOTLESS ARRAY 보정
if (json instanceof JSONArray) {
JSONObject wrap = new JSONObject();
wrap.put("KJB_ROOTLESS_ARRAY", json);
wrap.put("kjbrootlessarray", json);
modifiedBody = wrap.toJSONString();
}
@@ -37,8 +37,8 @@ public class ApiResponseAdvice implements ResponseBodyAdvice<Object> {
try {
Object root = JSONValue.parse(body);
if (root instanceof JSONObject && ((JSONObject) root).containsKey("KJB_ROOTLESS_ARRAY")) {
JSONArray jsonArray = (JSONArray) ((JSONObject) root).get("KJB_ROOTLESS_ARRAY");
if (root instanceof JSONObject && ((JSONObject) root).containsKey("kjbrootlessarray")) {
JSONArray jsonArray = (JSONArray) ((JSONObject) root).get("kjbrootlessarray");
return jsonArray.toJSONString();
} else {
return body;