public final class JodaBeanSer
extends java.lang.Object
Serialization of Joda-Beans uses the information in the beans to optimize the size of the data output.
| Modifier and Type | Field | Description |
|---|---|---|
static JodaBeanSer |
COMPACT |
Obtains the singleton compact instance.
|
static JodaBeanSer |
PRETTY |
Obtains the singleton pretty-printing instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
JodaBeanBinReader |
binReader() |
Creates a binary reader.
|
JodaBeanBinWriter |
binWriter() |
Creates a binary writer.
|
org.joda.convert.StringConvert |
getConverter() |
Gets the string converter.
|
SerDeserializers |
getDeserializers() |
Gets the deserializers.
|
java.lang.String |
getIndent() |
Gets the pretty print indent.
|
SerIteratorFactory |
getIteratorFactory() |
Gets the iterator factory.
|
java.lang.String |
getNewLine() |
Gets the new line string.
|
boolean |
isIncludeDerived() |
Gets the include derived flag.
|
boolean |
isShortTypes() |
Gets whether to use short types.
|
JodaBeanJsonReader |
jsonReader() |
Creates a JSON reader.
|
JodaBeanJsonWriter |
jsonWriter() |
Creates a JSON writer.
|
JodaBeanSimpleJsonReader |
simpleJsonReader() |
Creates a simple JSON reader.
|
JodaBeanSimpleJsonWriter |
simpleJsonWriter() |
Creates a simple JSON writer.
|
JodaBeanSimpleMapReader |
simpleMapReader() |
Creates a simple in-memory
Map reader. |
JodaBeanSimpleMapWriter |
simpleMapWriter() |
Creates a simple in-memory
Map writer. |
java.lang.String |
toString() |
|
JodaBeanSer |
withConverter(org.joda.convert.StringConvert converter) |
Returns a copy of this serializer with the specified string converter.
|
JodaBeanSer |
withDeserializers(SerDeserializers deserializers) |
Returns a copy of this serializer with the specified deserializers.
|
JodaBeanSer |
withIncludeDerived(boolean includeDerived) |
Returns a copy of this serializer with the specified include derived flag.
|
JodaBeanSer |
withIndent(java.lang.String indent) |
Returns a copy of this serializer with the specified pretty print indent.
|
JodaBeanSer |
withIteratorFactory(SerIteratorFactory iteratorFactory) |
Returns a copy of this serializer with the specified iterator factory.
|
JodaBeanSer |
withNewLine(java.lang.String newLine) |
Returns a copy of this serializer with the specified pretty print new line.
|
JodaBeanSer |
withShortTypes(boolean shortTypes) |
Returns a copy of this serializer with the short types flag set.
|
JodaBeanXmlReader |
xmlReader() |
Creates an XML reader.
|
JodaBeanXmlWriter |
xmlWriter() |
Creates an XML writer.
|
public static final JodaBeanSer COMPACT
public static final JodaBeanSer PRETTY
public java.lang.String getIndent()
public JodaBeanSer withIndent(java.lang.String indent)
indent - the indent, not nullpublic java.lang.String getNewLine()
public JodaBeanSer withNewLine(java.lang.String newLine)
newLine - the new line, not nullpublic org.joda.convert.StringConvert getConverter()
The default converter can be modified.
public JodaBeanSer withConverter(org.joda.convert.StringConvert converter)
The default converter can be modified.
converter - the converter, not nullpublic SerIteratorFactory getIteratorFactory()
public JodaBeanSer withIteratorFactory(SerIteratorFactory iteratorFactory)
iteratorFactory - the iterator factory, not nullpublic boolean isShortTypes()
public JodaBeanSer withShortTypes(boolean shortTypes)
shortTypes - whether to use short types, not nullpublic SerDeserializers getDeserializers()
The default deserializers can be modified.
public JodaBeanSer withDeserializers(SerDeserializers deserializers)
The default deserializers can be modified.
This can be used to select a more lenient mode of parsing, see SerDeserializers.LENIENT.
deserializers - the deserializers, not nullpublic boolean isIncludeDerived()
The default deserializers can be modified.
public JodaBeanSer withIncludeDerived(boolean includeDerived)
The default deserializers can be modified.
This is used to set the output to include derived properties.
includeDerived - whether to include derived properties on outputpublic JodaBeanBinWriter binWriter()
A new instance of the writer must be created for each message.
public JodaBeanBinReader binReader()
A new instance of the reader must be created for each message.
public JodaBeanXmlWriter xmlWriter()
A new instance of the writer must be created for each message.
public JodaBeanXmlReader xmlReader()
A new instance of the reader must be created for each message.
public JodaBeanJsonWriter jsonWriter()
A new instance of the writer must be created for each message.
public JodaBeanJsonReader jsonReader()
A new instance of the reader must be created for each message.
public JodaBeanSimpleJsonWriter simpleJsonWriter()
A new instance of the writer must be created for each message. The simple writer omits all metadata. It is suitable for simple beans as often found in data-transfer protocols.
Not all beans can be used with the simple JSON writer as no type information is written.
If a bean has subclasses, or the declared type of a property or collection is
Object, then the JSON will not round trip. Where the type cannot be determined,
the reader will return Boolean, Integer, Double, String,
ArrayList or string keyed HashMap.
Maps must have keys that can be written as a string.
public JodaBeanSimpleJsonReader simpleJsonReader()
A new instance of the reader must be created for each message.
The simple reader is designed to operate with the simple writer.
It will not operate well with the output of jsonWriter().
public JodaBeanSimpleMapWriter simpleMapWriter()
Map writer.
A new instance of the writer must be created for each message.
public JodaBeanSimpleMapReader simpleMapReader()
Map reader.
A new instance of the reader must be created for each message.
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2007–2018 Joda.org. All rights reserved.