Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/src/main/java/com/alibaba/fastjson2/JSONReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -2746,6 +2746,7 @@ public List readArray() {
}
case '/':
skipComment();
--i;
continue;
default:
throw new JSONException(info());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.alibaba.fastjson2.issues_3400;

import com.alibaba.fastjson2.*;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class Issue3485 {
@Test
public void test() throws Exception {
String json = "{\n" +
" \"file_list\": [\n" +
" 11, // CreateBlogRequest.java - 可能需要修改以支持删除操作\n" +
" 13, // BlogRepository.java - 需要添加删除方法\n" +
" 22, // CreateBlogResponse.java - 可能需要修改以支持删除操作的响应\n" +
" 26, // BlogService.java - 需要添加删除博客的业务逻辑\n" +
" 27, // BlogPost.java - 可能需要修改以支持删除操作\n" +
" 29, // BlogController.java - 需要添加删除博客的API\n" +
" 33 // BlogServiceTest.java - 需要添加删除博客的测试用例\n" +
" ]\n" +
" }";
JSONObject jsonObject = JSON.parseObject(json);
assertEquals("{\"file_list\":[11,13,22,26,27,29,33]}", jsonObject.toJSONString());
}
}