i m trying to convert json into map as key value pair i have a method JsonSlurper() which give me the key value pair but my query is i have a json as bellow.
{"Result":"null",
"gbet":{"Qpet":[
{"msg":"MSG","over":"N","repair":[{"notification":null,"sce":"1","repair1":"CA","repairDes":null,"ran":1},
{"rep":"dvr"}],
{"msgger":"MSGwe","overw":"Ner"}]
}
how to get all the things in a single map with each key value pair i m doing like this
def slurper = new JsonSlurper().parseText(str)
log.info("sulpher"+slurper)
def keys=slurper.keySet();
log.info('keys'+keys)
but its not working for me i want each key and value pair as a separate field.