Exemplo n.º 1
0
 def serializeValue(self, value, typeInstance):
     """Serialize value.
     """
     if annotation.isPrimitiveType(typeInstance):
         self.serialize(value, typeInstance)
     else:
         self.writeObject(value, typeInstance)
Exemplo n.º 2
0
 def deserializeValue(self, typeInstance):
     """Extract value from token stream.
     """
     if annotation.isPrimitiveType(typeInstance):
         customSerializer = igwt.ICustomFieldSerializer(typeInstance)
         return customSerializer.deserialize(self)
     return self.readObject()