ccc.plugins.s11n
Interface Serializer<T>

Type Parameters:
T - The type of object to be serialized / deserialized.
All Known Implementing Classes:
AbstractSerializer, ACLSerializer, ActionSerializer, ActionSummarySerializer, AliasSerializer, APISerializer, CommentSerializer, DurationSerializer, FailureSerializer, FileSerializer, FolderSerializer, GroupSerializer, MimeTypeSerializer, PageCriteriaSerializer, PagedCollectionSerializer, PageSerializer, ParagraphSerializer, ResourceCriteriaSerializer, ResourceSerializer, ResourceSummarySerializer, ResSerializer, RevisionSerializer, SearchResultSerializer, TemplateSerializer, TempSerializer, UserSerializer

public interface Serializer<T>

Serialize an object to / from a representation.

Author:
Civic Computing Ltd.

Method Summary
 T read(Json json)
          Deserialize from a representation.
 Json write(Json json, T instance)
          Serialize to representation.
 

Method Detail

write

Json write(Json json,
           T instance)
Serialize to representation.

Parameters:
json - The wire representation.
instance - The object to serialize.
Returns:
Returns the 'json' input param if the 'instance' param is not NULL; returns NULL otherwise.

read

T read(Json json)
Deserialize from a representation.

Parameters:
json - The wire representation.
Returns:
The corresponding object.


Copyright © 2010. All Rights Reserved.