parsing - how to parse inner level json objects if the keys are unknown in groovy -
i doing automation script in m getting inner levels json , keys unknown me how can parse json convert json map key value pairs contains json array json object want create them separately can distinguish b/w these.
i m having json format as-:
{ "seatbid":[ { "bid":[ { "id":"1", "impid":"1", "price":3.5999999046325684, "nurl":"abc.com", "adomain":[ "zagg.com", "zagg.com" ], "iurl":"abc.com", "crid":"30364.s320x50m", "h":0, "w":0 } ], "group":0 } ], "cur":"usd", "nbr":0 }
my code follows not working @ because key values have enter values -:
def respslurper = new jsonslurper() def respjson = respslurper.parsetext(content) log.info(respjson.keyset()) log.info(respjson.values()) log.info(respjson.get("seatbid"))`
Comments
Post a Comment