예제 #1
0
 def unmarshal(self, value):
     try:
         value = self.formatter.unmarshal(value)
     except ValueError as exc:
         raise InvalidSchemaFormatValue(value, self.schema.format, exc)
     else:
         return self._unmarshal_object(value)
예제 #2
0
 def unmarshal(self, value):
     try:
         return self.formatter.unmarshal(value)
     except ValueError as exc:
         schema_format = self.schema.getkey("format")
         raise InvalidSchemaFormatValue(value, schema_format, exc)