- All Known Implementing Classes:
AbstractDataObject,Command,InsertElement,ListUpdate,RemoveElement,SetProperty
public interface DataObject
Common interface for all
msgbuf generated data objects.-
Method Summary
Modifier and TypeMethodDescriptionvoidReads a JSON object containing keys for all fields of this object.voidwriteContent(JsonWriter out) Writes a JSON object containing keys for all fields of this object.voidwriteTo(JsonWriter out) Writes this instance to the given output.
-
Method Details
-
writeTo
Writes this instance to the given output.- Parameters:
out- TheJsonWriterto write this instance to.- Throws:
IOException- if writing fails.
-
writeContent
Writes a JSON object containing keys for all fields of this object.In contrast to
writeTo(JsonWriter), the resulting object contains no type information. Therefore, this method must only be called directly, if the reader knows the type of the object to read from the context. For reading the data, a per-type generatedread[type-name]()method must be called.- Parameters:
out- The writer to write to.- Throws:
IOException
-
readContent
Reads a JSON object containing keys for all fields of this object.This method does not consider type information contained in the stream.
- Parameters:
in- The writer to write to.- Throws:
IOException
-