class documentation
Converter for converting an object from Python json.loads
result (e.g. scalar, list, or dict) to a known type.
Method | to |
Convert the given value to a type based on the given hint. |
Class Variable |
|
Sentinel value that must be used as the result of to_typed_value to say the given type is not handled by this converter. |
@abstractmethod
def to_typed_value(self, hint:
def to_typed_value(self, hint:
Type
, value: Any
) -> Union[ Optional[ Any], _JSONTypeConverterUnhandled]
:
(source)
¶
Convert the given value to a type based on the given hint.
Parameters | |
hint:Type | Type hint to use to help in converting the value. |
value:Any | Value as returned by json.loads . Usually a scalar,
list, or dict. |
Returns | |
Union[ | The converted value or Unhandled if this converter does
not handle this situation. |
Sentinel value that must be used as the result of
to_typed_value
to say the given type is not handled by this
converter.