title: modifying json with jsonbuilder in Groovy
body: <p>I am trying to modify content of json and then print it to see if it has changed with this code but getting error </p>
  
  <pre><code> def builder = new JsonBuilder(request)
   log.info(builder.content)
   builder.content.device.dpidsha1= 'abcd'  
   log.info(builder.toPrettyString())
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>no such property: device
  </code></pre>
  
  <p>json looks like this:</p>
  
  <pre><code>{
     "app":{ },
     "at":2,
     "badv":[ ],
     "bcat":[ ],
     "device":{
        "carrier":"310-410",
        "connectiontype":3,
        "devicetype":1,
        "dnt":0,
        "dpidmd5":"268d403db34e32c45869bb1401247af9",
        "dpidsha1":"1234",
  .
  .
  }
  </code></pre>
  
  <p>can someone help in understanding what am i doing wrong and how can i correct it. </p>