示例#1
0
 def serializeValue(self, value, typeInstance):
     """Serialize value.
     """
     if annotation.isPrimitiveType(typeInstance):
         self.serialize(value, typeInstance)
     else:
         self.writeObject(value, typeInstance)
示例#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()