Package groovy.json
Class JsonDelegate
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.json.JsonDelegate
- All Implemented Interfaces:
- GroovyObject
Utility class used as delegate of closures representing JSON objects.
- Since:
- 1.8.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionFactory method for creatingJsonDelegates from closures.curryDelegateAndGetContent(Closure<?> c, Object o) Factory method for creatingJsonDelegates from closures currying an object argument.invokeMethod(String name, Object args) Intercepts calls for setting a key and value for a JSON objectMethods inherited from class groovy.lang.GroovyObjectSupportgetMetaClass, setMetaClassMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface groovy.lang.GroovyObjectgetProperty, setProperty
- 
Constructor Details- 
JsonDelegatepublic JsonDelegate()
 
- 
- 
Method Details- 
invokeMethodIntercepts calls for setting a key and value for a JSON object- Parameters:
- name- the key name
- args- the value associated with the key
- Returns:
- the result of invoking the method
 
- 
cloneDelegateAndGetContentFactory method for creatingJsonDelegates from closures.- Parameters:
- c- closure representing JSON objects
- Returns:
- an instance of JsonDelegate
 
- 
curryDelegateAndGetContentFactory method for creatingJsonDelegates from closures currying an object argument.- Parameters:
- c- closure representing JSON objects
- o- an object curried to the closure
- Returns:
- an instance of JsonDelegate
 
- 
getContent
 
-