Package groovy.json
Interface JsonGenerator.Converter
- 
- All Known Implementing Classes:
- DefaultJsonGenerator.ClosureConverter
 - Enclosing interface:
- JsonGenerator
 
 public static interface JsonGenerator.ConverterHandles converting a given type.- Since:
- 2.5.0
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectconvert(java.lang.Object value, java.lang.String key)Converts a given object.booleanhandles(java.lang.Class<?> type)Returnstrueif this converter can handle conversions of the given type.
 
- 
- 
- 
Method Detail- 
handlesboolean handles(java.lang.Class<?> type) Returnstrueif this converter can handle conversions of the given type.- Parameters:
- type- the type of the object to convert
- Returns:
- trueif this converter can successfully convert values of the given type, else- false
 
 - 
convertjava.lang.Object convert(java.lang.Object value, java.lang.String key)Converts a given object.- Parameters:
- value- the object to convert
- key- the key name for the value, may be- null
- Returns:
- the converted object
 
 
- 
 
-