Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.6
-
None
Description
The LAX parser throws a groovy.json.JsonException when you put a comment after the last array element but before the closing ']'
Example:
import groovy.json.JsonParserType import groovy.json.JsonSlurper def sampleJson = ''' [ // good comment { "mykey" : "myvalue" } // bad comment ] ''' def json = new JsonSlurper(type: JsonParserType.LAX).parseText(sampleJson) println "This should work"
Expected is that this comment should also be ignored