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