I created a JSON object via JSONBuilder class:
def json = new JSONBuilder().build {...}
How can I transform this JSON object to groovy object, so that I can access json properties via dot('.') operator? JSON object has a field - target. And I can access properties:
target.someProperty
But target property is protected. Is there any other way to access json properties?
P.S. Currently I use work around:
new JsonSlurper().parseText(json.toString())
It works, but I want something simplier.