yuhengfdada commented on PR #1972:
URL: https://github.com/apache/groovy/pull/1972#issuecomment-1777313262

   > With this change, this unit test is failing in `JsonSlurperLaxTest.groovy`:
   > 
   > ```
   >     void testArrayOfArrayWithSimpleValues() {
   >         assert parser.parseText('[1, 2, 3, ["a", "b", "c", [true, false], 
"d"], 4]') ==
   >                 [1, 2, 3, ["a", "b", "c", [true, false], "d"], 4]
   > 
   >         shouldFail(JsonException) { parser.parseText('[') }
   >         parser.parseText('[,]')
   >         shouldFail(JsonException) { parser.parseText('[1') }
   >         parser.parseText('[1,')
   >         shouldFail(JsonException) { parser.parseText('[1, 2') }
   >         parser.parseText('[1, 2, [3, 4]')
   >     }
   > ```
   > 
   > Not sure why the author expected something like `parser.parseText('[1, 2, 
[3, 4]')` to not fail. Seems like an invalid JSON String.
   
   Having read the documentation, maybe `JsonParserLax` is expected to have 
this behavior. Unfortunately `JsonParserLax` extends `JsonParserCharArray` so 
this fix won't work. Closing the PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@groovy.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to