top level method:
shared T deserialize<T>(
String encoded,
SerializationType type
) given T satisfies Object { ...}
and abstract class with objects:
shared abstract class SerializationType() of base64|json|xml|jsonReadOnly|xmlReadOnly| ceylonJson {}
shared object xml extends SerializationType() {}
shared object json extends SerializationType() {}
shared object ceylonJson extends SerializationType() {}
shared object jsonReadOnly extends SerializationType() {}
shared object xmlReadOnly extends SerializationType() {}
shared object base64 extends SerializationType() {}
for example:
SerializationType _xml = new xml();
SomeType x = deserialize_.deserialize(_xml
, someEncodedText);
but I can not do so.