org.elkoserver.json
Interface Encodable

All Known Subinterfaces:
Position
All Known Implementing Classes:
AuthDesc, BankWorker, BasicObject, Cap, Cartesian, CartesianPosition, Census, Chat, Context, ContextKeyCap, Currency, Definer, DeviceUserMod, Dictionary, GeoPosition, Image, Invisible, Item, LoadDesc, Mod, Note, NoteMaker, ObjectDesc, PrivateChat, PutDesc, QueryDesc, RequestDesc, ResultDesc, ServiceDesc, StyleDesc, StyleOptions, TalkOptions, TalkPrefs, UpdateDesc, UpdateResultDesc, User, WorkerObject

public interface Encodable

Implementing this interface enables an object's state to be output as a JSON object literal.


Method Summary
 JSONLiteral encode(EncodeControl control)
          Produce a JSONLiteral representing the encoded state of this object, suitable for transmission over a messaging medium or for writing to persistent storage.
 

Method Detail

encode

JSONLiteral encode(EncodeControl control)
Produce a JSONLiteral representing the encoded state of this object, suitable for transmission over a messaging medium or for writing to persistent storage.

Parameters:
control - Encode control determining what flavor of encoding should be done.
Returns:
a JSONLiteral representing the encoded state of this object.