mirror of https://github.com/alibaba/fastjson2.git
				
				
				
			
							parent
							
								
									08c2f3089d
								
							
						
					
					
						commit
						92bd063907
					
				|  | @ -160,6 +160,10 @@ public final class ObjectReaderImplObject | |||
|                     break; | ||||
|                 } | ||||
| 
 | ||||
|                 if (jsonReader.current() == '/') { | ||||
|                     jsonReader.skipComment(); | ||||
|                 } | ||||
| 
 | ||||
|                 Object name; | ||||
|                 if (i == 0 && typeName == null && hash != 0) { | ||||
|                     name = jsonReader.getFieldName(); | ||||
|  |  | |||
|  | @ -0,0 +1,18 @@ | |||
| package com.alibaba.fastjson2.issues_3700; | ||||
| 
 | ||||
| import com.alibaba.fastjson2.JSONArray; | ||||
| import org.junit.jupiter.api.Test; | ||||
| 
 | ||||
| import static org.junit.jupiter.api.Assertions.assertEquals; | ||||
| 
 | ||||
| public class Issue3719 { | ||||
|     @Test | ||||
|     public void test() { | ||||
|         assertEquals("[{\"a\":700000,\"b\":1}]", JSONArray.parse("[{\n" + | ||||
|                 "                    // 注释a\n" + | ||||
|                 "                    \"a\":700000, \n" + | ||||
|                 "                    // 注释b\n" + | ||||
|                 "                    \"b\":1 \n" + | ||||
|                 "                }]").toString()); | ||||
|     } | ||||
| } | ||||
		Loading…
	
		Reference in New Issue