mirror of https://github.com/alibaba/fastjson2.git
fix remove second null for issue #3485
This commit is contained in:
parent
c9273e8f88
commit
3236d8014c
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-20.04, windows-latest, macos-latest ]
|
||||
java: [ 8, 11, 17, 21 ]
|
||||
java: [ 8, 11, 17, 21, 23 ]
|
||||
fail-fast: false
|
||||
max-parallel: 16
|
||||
name: Test on JDK ${{ matrix.java }} OS ${{ matrix.os }}
|
||||
|
|
|
|||
|
|
@ -2746,6 +2746,7 @@ public abstract class JSONReader
|
|||
}
|
||||
case '/':
|
||||
skipComment();
|
||||
--i;
|
||||
continue;
|
||||
default:
|
||||
throw new JSONException(info());
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue