我有以下 json 字符串:
[ { id: '123', name: 'bla bla', type: 'Source', isLeaf: true },
{ id: '3425', name: 'test test', type: 'Reference', isLeaf: false },
{ id: '12678', name: 'tags', type: 'Source', isLeaf: false },
]
我正在尝试使用 JsonSlurper 解析它,但出现错误:
groovy.json.JsonException: Lexing failed on line: 1, column: 5, while reading 'i', no possible valid JSON value or punctuation could be recognized.
我如何解析它并访问它id:'3425'
?