public interface MwsObject
| Modifier and Type | Method and Description |
|---|---|
void |
readFragmentFrom(MwsReader r)
Read from a reader not including any enclosing tags/markers.
|
String |
toJSON()
Write self to a JSON object representation.
|
String |
toJSONFragment()
Render self to a fragment of JSON.
|
String |
toXML()
Write self to a XML object representation.
|
String |
toXMLFragment()
Render self to an XML fragment.
|
void |
writeFragmentTo(MwsWriter w)
Write the inner contents to a writer.
|
void |
writeTo(MwsWriter w)
Write the entire object to a writer.
|
void readFragmentFrom(MwsReader r)
For XML reads inner tags for elements but not the enclosing tag. This method will read attributes if the reader is positioned on a start tag otherwise it will not act as if no attributes were present.
For JSON reads the name: elements but not the enclosing braces.
r - The reader to read from.String toJSON()
This includes beginning brace, labe:value contents, and ending brace.
String toJSONFragment()
This would be just the contents of the braces for the whole JSON object.
String toXML()
This includes begin tag, attributes, inner tags, and end tag.
String toXMLFragment()
This includes the inner tags of the full XML representation, but not the outer tag or any attributes.
void writeFragmentTo(MwsWriter w)
Attributes are written. Then the inner values are written. No begin or end markers are written.
w - The write to write to.void writeTo(MwsWriter w)
This includes the beginning marker, attribute values, inner contents and ending marker.
w - The writer to write to.Copyright © 2014. All Rights Reserved.