public interface JsonGenerator
Temporary fork of groovy JsonGenerator until Groovy 2.5.0 is out.
Generates JSON from objects.
The Options builder can be used to configure an instance of a JsonGenerator.
Modifiers | Name | Description |
---|---|---|
interface |
JsonGenerator.Converter |
Handles converting a given type. |
class |
JsonGenerator.Options |
A builder used to construct a JsonGenerator instance that allows control over the serialized JSON output. |
Type Params | Return Type | Name and description |
---|---|---|
|
public boolean |
isExcludingFieldsNamed(java.lang.String name) Indicates whether this JsonGenerator is configured to exclude fields by the given name. |
|
public boolean |
isExcludingValues(java.lang.Object value) Indicates whether this JsonGenerator is configured to exclude values of the given object (may be null ). |
|
public java.lang.String |
toJson(java.lang.Object object) Converts an object to its JSON representation. |
Indicates whether this JsonGenerator is configured to exclude fields by the given name.
name
- of the field Indicates whether this JsonGenerator is configured to exclude values
of the given object (may be null
).
value
- an instance of an objectConverts an object to its JSON representation.
object
- to convert to JSON