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) -> Any | None | _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 | |
Any | None | _JSONTypeConverterUnhandled | 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.