public abstract class WriterSerializerSession extends SerializerSession
SerializerSession
for character-based serializers.
This class is NOT thread safe. It is typically discarded after one-time use although it can be reused within the same thread.
indent
Modifier | Constructor and Description |
---|---|
protected |
WriterSerializerSession(Serializer ctx,
SerializerSessionArgs args)
Create a new session using properties specified in the context.
|
protected |
WriterSerializerSession(SerializerSessionArgs args)
Constructor for sessions that don't require context.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isWriterSerializer()
Returns
WriterSerializer . |
String |
serialize(Object o)
Convenience method for serializing an object to a
String . |
asMap, canIgnoreValue, createBeanTypeNameProperty, createPipe, doSerialize, generalize, getBeanTypeName, getExpectedRootType, getInitialDepth, getJavaMethod, getLastLocation, getListener, getListener, getMaxDepth, getMaxIndent, getQuoteChar, getResponseHeaders, getUriResolver, isAddBeanTypeProperties, isDetectRecursions, isIgnoreRecursions, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimNulls, isTrimStrings, isUseWhitespace, onBeanGetterException, onError, pop, push, relativizeUri, resolveUri, serialize, setCurrentClass, setCurrentProperty, sort, sort, toList, toString, trim, willRecurse
_class, checkForWarnings, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, getArgsClassMeta, getBeanMeta, getBeanRegistry, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getLocale, getMediaType, getStringBuilder, getTimeZone, isBean, isBean, isDebug, isIgnoreUnknownBeanProperties, newBean, newBean, newBeanMap, newBeanMap, newInstance, newInstance, newInstanceFromOuter, object, returnStringBuilder, string, toArray, toBeanMap, toBeanMap
addToCache, addToCache, addWarning, getClassProperty, getFromCache, getInstanceArrayProperty, getInstanceProperty, getLogger, getProperties, getProperty, getProperty, getProperty, getPropertyKeys, getWarnings, hasWarnings, toString
protected WriterSerializerSession(Serializer ctx, SerializerSessionArgs args)
ctx
- The context creating this session object.
The context contains all the configuration settings for this object.args
- Runtime arguments.
These specify session-level information such as locale and URI context.
It also include session-level properties that override the properties defined on the bean and
serializer contexts.protected WriterSerializerSession(SerializerSessionArgs args)
args
- Runtime session arguments.public final boolean isWriterSerializer()
SerializerSession
WriterSerializer
.isWriterSerializer
in class SerializerSession
WriterSerializer
.public final String serialize(Object o) throws SerializeException
String
.serialize
in class SerializerSession
o
- The object to serialize.SerializeException
- If a problem occurred trying to convert the output.Copyright © 2018 Apache. All rights reserved.