@Component public class XStreamJSONSerialization extends java.lang.Object implements JSONSerialization
Modifier and Type | Field and Description |
---|---|
protected XStreamBuilder |
builder |
protected TypeNameExtractor |
extractor |
protected ProxyInitializer |
initializer |
protected javax.servlet.http.HttpServletResponse |
response |
Constructor and Description |
---|
XStreamJSONSerialization(javax.servlet.http.HttpServletResponse response,
TypeNameExtractor extractor,
ProxyInitializer initializer,
XStreamBuilder builder) |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(java.lang.String format) |
<T> Serializer |
from(T object)
Serializes this object to the clients writer with out ROOT alias.
|
<T> Serializer |
from(T object,
java.lang.String alias)
Serializes this object to the clients writer, with a given alias.
|
protected com.thoughtworks.xstream.io.HierarchicalStreamDriver |
getHierarchicalStreamDriver()
Deprecated.
Override this method on XStreamBuilderImpl instead. WARN: this method will be ignored!
|
protected SerializerBuilder |
getSerializer() |
protected com.thoughtworks.xstream.XStream |
getXStream()
Deprecated.
prefer overwriting XStreamBuilder
|
JSONSerialization |
indented() |
<T> NoRootSerialization |
withoutRoot()
You can override this method for configuring Driver before serialization
|
protected final javax.servlet.http.HttpServletResponse response
protected final TypeNameExtractor extractor
protected final ProxyInitializer initializer
protected final XStreamBuilder builder
public XStreamJSONSerialization(javax.servlet.http.HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder)
public boolean accepts(java.lang.String format)
accepts
in interface Serialization
public <T> Serializer from(T object)
NoRootSerialization
from
in interface NoRootSerialization
public <T> Serializer from(T object, java.lang.String alias)
Serialization
from
in interface Serialization
protected SerializerBuilder getSerializer()
public <T> NoRootSerialization withoutRoot()
withoutRoot
in interface JSONSerialization
public JSONSerialization indented()
indented
in interface JSONSerialization
@Deprecated protected com.thoughtworks.xstream.XStream getXStream()
@Deprecated protected com.thoughtworks.xstream.io.HierarchicalStreamDriver getHierarchicalStreamDriver()
Copyright © 2013 Caelum. All Rights Reserved.