org.apache.cxf.jaxrs.provider.json
Class DataBindingJSONProvider<T>
java.lang.Object
org.apache.cxf.jaxrs.provider.DataBindingProvider<T>
org.apache.cxf.jaxrs.provider.json.DataBindingJSONProvider<T>
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>
@Provider
@Produces(value="application/json")
@Consumes(value="application/json")
public class DataBindingJSONProvider<T>
- extends DataBindingProvider<T>
Method Summary |
protected XMLStreamReader |
createReader(Class<?> type,
Type genericType,
InputStream is)
|
protected XMLStreamWriter |
createWriter(Class<?> type,
Type genericType,
String enc,
OutputStream os)
|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt)
|
void |
setArrayKeys(List<String> keys)
|
void |
setDropRootElement(boolean dropRootElement)
|
void |
setIgnoreMixedContent(boolean ignoreMixedContent)
|
void |
setIgnoreNamespaces(boolean ignoreNamespaces)
|
void |
setNamespaceMap(Map<String,String> nsMap)
|
void |
setReadXsiType(boolean read)
|
void |
setSerializeAsArray(boolean asArray)
|
void |
setWriteXsiType(boolean write)
|
protected void |
writeToWriter(XMLStreamWriter writer,
Object o)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataBindingJSONProvider
public DataBindingJSONProvider()
setIgnoreNamespaces
public void setIgnoreNamespaces(boolean ignoreNamespaces)
setDropRootElement
public void setDropRootElement(boolean dropRootElement)
setWriteXsiType
public void setWriteXsiType(boolean write)
setReadXsiType
public void setReadXsiType(boolean read)
setArrayKeys
public void setArrayKeys(List<String> keys)
setSerializeAsArray
public void setSerializeAsArray(boolean asArray)
isReadable
public boolean isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt)
- Specified by:
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<T>
- Overrides:
isReadable
in class DataBindingProvider<T>
setNamespaceMap
public void setNamespaceMap(Map<String,String> nsMap)
createWriter
protected XMLStreamWriter createWriter(Class<?> type,
Type genericType,
String enc,
OutputStream os)
throws Exception
- Overrides:
createWriter
in class DataBindingProvider<T>
- Throws:
Exception
writeToWriter
protected void writeToWriter(XMLStreamWriter writer,
Object o)
throws Exception
- Overrides:
writeToWriter
in class DataBindingProvider<T>
- Throws:
Exception
createReader
protected XMLStreamReader createReader(Class<?> type,
Type genericType,
InputStream is)
throws Exception
- Overrides:
createReader
in class DataBindingProvider<T>
- Throws:
Exception
setIgnoreMixedContent
public void setIgnoreMixedContent(boolean ignoreMixedContent)
Apache CXF