Groovy Documentation

## groovy.json
[Groovy] Class JsonDelegate

    java.lang.Object
      groovy.json.JsonDelegate

    class JsonDelegate

Utility class used as delegate of closures representing JSON objects.

Authors:
  Guillaume Laforge

Since:
  1.8.0

Property Summary
`java.lang.Object` | `content`

Method Summary
`static java.lang.Object` | `cloneDelegateAndGetContent(Closure c)` Factory method for creating `JsonDelegate`s from closures.
`java.lang.Object` | `invokeMethod(java.lang.String name, java.lang.Object args)` Intercepts calls for setting a key and value for a JSON object

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### content

    java.lang.Object content

Method Detail

### cloneDelegateAndGetContent

    static java.lang.Object cloneDelegateAndGetContent(Closure c)

  Factory method for creating `JsonDelegate`s from closures.
  Parameters:
    `c` - closure representing JSON objects
  Returns:
    an instance of `JsonDelegate`

### invokeMethod

    java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)

  Intercepts calls for setting a key and value for a JSON object
  Parameters:
    `name` - the key name
    `args` - the value associated with the key

Groovy Documentation