public interface DataWriter
The call sequence is:
EVENTS := type? startObject PROPERTY* endObject
PROPERTY := name VALUE
VALUE := valuePrimitive
| value
| valueNull
| startArray VALUE* endArray
| EVENTS
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASS_PROPERTY_NAME
Recommended property name to write out the 'type' parameter of
type(Type,Class) |
| Modifier and Type | Method and Description |
|---|---|
void |
endArray() |
void |
endObject() |
void |
name(String name) |
void |
startArray() |
void |
startObject() |
void |
type(Type expected,
Class actual)
Augments the next
startObject() call by specifying the type information of that object. |
void |
value(String v) |
void |
valueNull() |
void |
valuePrimitive(Object v) |
static final String CLASS_PROPERTY_NAME
type(Type,Class)void name(String name) throws IOException
IOExceptionvoid valuePrimitive(Object v) throws IOException
IOExceptionvoid value(String v) throws IOException
IOExceptionvoid valueNull()
throws IOException
IOExceptionvoid startArray()
throws IOException
IOExceptionvoid endArray()
throws IOException
IOExceptionvoid type(@Nullable Type expected, @Nullable Class actual) throws IOException
startObject() call by specifying the type information of that object.expected - The declared type of the variable that references this object.
Null if the object is not referenced by anyone, for example when it's the root.actual - The actual type of the object being written.
Null if the object is synthetic and has no valid Java typeIOExceptionvoid startObject()
throws IOException
IOExceptionvoid endObject()
throws IOException
IOExceptionCopyright © 2016. All rights reserved.