Package groovy.json
Class JsonDelegate
- java.lang.Object
- 
- groovy.lang.GroovyObjectSupport
- 
- groovy.json.JsonDelegate
 
 
- 
- All Implemented Interfaces:
- GroovyObject
 
 public class JsonDelegate extends GroovyObjectSupport Utility class used as delegate of closures representing JSON objects.- Since:
- 1.8.0
 
- 
- 
Constructor SummaryConstructors Constructor Description JsonDelegate()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.Object>cloneDelegateAndGetContent(Closure<?> c)Factory method for creatingJsonDelegates from closures.static java.util.Map<java.lang.String,java.lang.Object>curryDelegateAndGetContent(Closure<?> c, java.lang.Object o)Factory method for creatingJsonDelegates from closures currying an object argument.java.util.Map<java.lang.String,java.lang.Object>getContent()java.lang.ObjectinvokeMethod(java.lang.String name, java.lang.Object args)Intercepts calls for setting a key and value for a JSON object- 
Methods inherited from class groovy.lang.GroovyObjectSupportgetMetaClass, getProperty, setMetaClass, setProperty
 
- 
 
- 
- 
- 
Method Detail- 
invokeMethodpublic java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)Intercepts calls for setting a key and value for a JSON object- Specified by:
- invokeMethodin interface- GroovyObject
- Overrides:
- invokeMethodin class- GroovyObjectSupport
- Parameters:
- name- the key name
- args- the value associated with the key
- Returns:
- the result of invoking the method
 
 - 
cloneDelegateAndGetContentpublic static java.util.Map<java.lang.String,java.lang.Object> cloneDelegateAndGetContent(Closure<?> c) Factory method for creatingJsonDelegates from closures.- Parameters:
- c- closure representing JSON objects
- Returns:
- an instance of JsonDelegate
 
 - 
curryDelegateAndGetContentpublic static java.util.Map<java.lang.String,java.lang.Object> curryDelegateAndGetContent(Closure<?> c, java.lang.Object o) Factory 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
 
 - 
getContentpublic java.util.Map<java.lang.String,java.lang.Object> getContent() 
 
- 
 
-