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() |
default ExportConfig |
getExportConfig() |
void |
name(String name) |
void |
startArray() |
void |
startObject() |
default 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
IOException
void valuePrimitive(Object v) throws IOException
IOException
void value(String v) throws IOException
IOException
void valueNull() throws IOException
IOException
void startArray() throws IOException
IOException
void endArray() throws IOException
IOException
default void 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 typeIOException
void startObject() throws IOException
IOException
void endObject() throws IOException
IOException
@NonNull default ExportConfig getExportConfig()
Copyright © 2004–2022. All rights reserved.