Anonymous user
JSON: Difference between revisions
→{{header|Groovy}}: Noted extra comma.
(→{{header|Groovy}}: Noted extra comma.) |
|||
Line 144:
=={{header|Groovy}}==
Solution requires Groovy 1.8 or later.
Note that JsonSlurper accepts an extra comma such as [1,2,3,]. This is an extension to the [[http://www.json.org/fatfree.html JSON grammar]].
<lang groovy>def slurper = new groovy.json.JsonSlurper()
def result = slurper.parseText('''
|