[Java] Interface JsonGenerator.Converter
public interface JsonGenerator.Converter
Handles converting a given type.
- Since:
- 2.5.0
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public Object |
convert(Object value, String key) Converts a given object. | |
public boolean |
handles(Class<?> type) Returns true if this converter can handle conversions of the given type. |
Method Detail
public Object convert(Object value, String key)
Converts a given object.
- Parameters:
-
value
- the object to convert -
key
- the key name for the value, may benull
- Returns:
- the converted object
public boolean handles(Class<?> type)
Returns true
if this converter can handle conversions of the given type.
- Parameters:
-
type
- the type of the object to convert
- Returns:
-
true
if this converter can successfully convert values of the given type, elsefalse
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/groovy/json/JsonGenerator.Converter.html