Top "Jsonbuilder" questions

How to construct json using JsonBuilder with key having the name of a variable and value having its value?

How to construct json using JsonBuilder with key and value having same name? import groovy.json.JsonBuilder def userId = 12 // some …

json groovy jsonbuilder
Groovy Simple JSON array builder

I need to build a simple JSON array in JSON but in the loop it overwrites the first value during …

arrays groovy jsonbuilder
modifying json with jsonbuilder in Groovy

I am trying to modify content of json and then print it to see if it has changed with this …

json groovy jsonbuilder
How to use groovy builder to generate an array-type json?

We can generate an object-type json by groovy's json builder: def builder = new groovy.json.JsonBuilder() def root = builder.people { …

groovy jsonbuilder
How do I use groovy jsonbuilder with .each to create an array?

I would like to create an array with JSON-Builder. Expected format: { "Header": { "SomeKey" : "SomeValue" } "Data": [ { "SomeKey" : "SomeValue" }, { "SomeKey" : "SomeValue" } ] } My …

arrays groovy each jsonbuilder
How to modify JSON in groovy

I use JsonBuilder to build a JSONObject/String. But, how can I update/change value of one field in this …

json groovy jsonbuilder