|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.json.impl.BaseJSONUnmarshaller
public class BaseJSONUnmarshaller
Field Summary | |
---|---|
protected javax.xml.bind.Unmarshaller |
jaxbUnmarshaller
|
protected JSONConfiguration |
jsonConfig
|
Constructor Summary | |
---|---|
BaseJSONUnmarshaller(javax.xml.bind.JAXBContext jaxbContext,
JSONConfiguration jsonConfig)
|
|
BaseJSONUnmarshaller(javax.xml.bind.Unmarshaller jaxbUnmarshaller,
JSONConfiguration jsonConfig)
|
Method Summary | ||
---|---|---|
JSONConfiguration |
getJSONConfiguration()
Provides information on current JSON configuration options for this object. |
|
|
unmarshalFromJSON(java.io.InputStream inputStream,
java.lang.Class<T> expectedType)
Unmarshal JSON data from the specified InputStream and
return the resulting Java content tree. |
|
|
unmarshalFromJSON(java.io.Reader reader,
java.lang.Class<T> expectedType)
Unmarshal JSON data from the specified Reader and
return the resulting Java content tree. |
|
|
unmarshalJAXBElementFromJSON(java.io.InputStream inputStream,
java.lang.Class<T> declaredType)
Unmarshal JSON data from the InputStream by
declaredType and return the resulting content tree. |
|
|
unmarshalJAXBElementFromJSON(java.io.Reader reader,
java.lang.Class<T> declaredType)
Unmarshal JSON data from the Reader by
declaredType and return the resulting content tree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final javax.xml.bind.Unmarshaller jaxbUnmarshaller
protected final JSONConfiguration jsonConfig
Constructor Detail |
---|
public BaseJSONUnmarshaller(javax.xml.bind.JAXBContext jaxbContext, JSONConfiguration jsonConfig) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public BaseJSONUnmarshaller(javax.xml.bind.Unmarshaller jaxbUnmarshaller, JSONConfiguration jsonConfig)
Method Detail |
---|
public JSONConfiguration getJSONConfiguration()
JSONConfigurated
getJSONConfiguration
in interface JSONConfigurated
JSONConfiguration
instance.public <T> T unmarshalFromJSON(java.io.InputStream inputStream, java.lang.Class<T> expectedType) throws javax.xml.bind.JAXBException
JSONUnmarshaller
InputStream
and
return the resulting Java content tree.
The UTF-8 character encoding scheme will be used to decode the encoded characters of the JSON data.
unmarshalFromJSON
in interface JSONUnmarshaller
T
- the type of the Java content tree.inputStream
- the InputStream to unmarshal JSON data from.expectedType
- the expected type of the Java content tree.
XmlRootElement
) or mapped to an XML type (for example,
annotated with XmlType
).
javax.xml.bind.JAXBException
- if any unexpected errors occur while unmarshalling.
javax.xml.bind.UnmarshalException
- if the JSONUnmarshaller
is unable
to perform the JSON to Java binding.public <T> T unmarshalFromJSON(java.io.Reader reader, java.lang.Class<T> expectedType) throws javax.xml.bind.JAXBException
JSONUnmarshaller
Reader
and
return the resulting Java content tree.
The character encoding scheme of the reader
will be used to
encode the characters of the JSON data.
unmarshalFromJSON
in interface JSONUnmarshaller
T
- the type of the Java content tree.reader
- the Reader to unmarshal JSON data from.expectedType
- the expected type of the Java content tree.
XmlRootElement
) or mapped to an XML type (for example,
annotated with XmlType
).
javax.xml.bind.JAXBException
- if any unexpected errors occur while unmarshalling.
javax.xml.bind.UnmarshalException
- if the JSONUnmarshaller
is unable
to perform the JSON to Java binding.public <T> javax.xml.bind.JAXBElement<T> unmarshalJAXBElementFromJSON(java.io.InputStream inputStream, java.lang.Class<T> declaredType) throws javax.xml.bind.JAXBException
JSONUnmarshaller
InputStream
by
declaredType
and return the resulting content tree.
The UTF-8 character encoding scheme will be used to decode the encoded characters of the JSON data.
unmarshalJAXBElementFromJSON
in interface JSONUnmarshaller
T
- the type of the Java content tree.inputStream
- the InputStream to unmarshal JSON data from.declaredType
- a class that is mapped to a XML root element
(for example, annotated with XmlRootElement
) or mapped to
an XML type (for example, annotated with XmlType
).
JAXBElement
instance.
javax.xml.bind.JAXBException
- if any unexpected errors occur while unmarshalling.
javax.xml.bind.UnmarshalException
- if the JSONUnmarshaller
is unable
to perform the JSON to Java binding.public <T> javax.xml.bind.JAXBElement<T> unmarshalJAXBElementFromJSON(java.io.Reader reader, java.lang.Class<T> declaredType) throws javax.xml.bind.JAXBException
JSONUnmarshaller
Reader
by
declaredType
and return the resulting content tree.
The character encoding scheme of the reader
will be used to
encode the characters of the JSON data.
unmarshalJAXBElementFromJSON
in interface JSONUnmarshaller
T
- the type of the Java content tree.reader
- the Reader to unmarshal JSON data from.declaredType
- a class that is mapped to a XML root element
(for example, annotated with XmlRootElement
) or mapped to
an XML type (for example, annotated with XmlType
).
JAXBElement
instance.
javax.xml.bind.JAXBException
- if any unexpected errors occur while unmarshalling.
javax.xml.bind.UnmarshalException
- if the JSONUnmarshaller
is unable
to perform the JSON to Java binding.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |