T - the type being marshalledpublic class ClassAwareGsonMarshalling<T> extends BaseGsonMarshalling<T>
ClassPropertyBasedJsonSerializer. Note that you cannot provide your own Gson instance
to this class as it relies on intercepting the default type parsing to add the custom class metadata element| Modifier and Type | Method and Description |
|---|---|
static <TT> ClassAwareGsonMarshalling<TT> |
ForAbstractClassOrInterface(Type type)
A convenience factory for producing a marshaller that works with abstract classes and interfaces.
|
static <T> com.atlassian.marshalling.api.MarshallingPair<T> |
pair(Type type)
Returns a
MarshallingPair for the given class. |
getGson, getTypeToken, marshallToBytes, unmarshallFrompublic static <TT> ClassAwareGsonMarshalling<TT> ForAbstractClassOrInterface(Type type)
TT - The type of the returned Marshallertype - The type that will be marshalledpublic static <T> com.atlassian.marshalling.api.MarshallingPair<T> pair(Type type)
MarshallingPair for the given class. The runtime type of the object will be included in the
serialized representation so that this information can be used when it is deserialized.T - The type of the returned MarshallingPairtype - The type that will be marshalledCopyright © 2016 Atlassian. All rights reserved.