Open davetapley opened 2 years ago
Feature request for:
@dataclass class HasLiteral: foo: Literal["one"] jsons.loads('{"foo": "one"}', HasLiteral)
Currently gives:
DeserializationError: No deserializer for type "typing.Literal"
And more realistic use case:
@dataclass class HasLiteral: foo: Union[Literal["one"], Literal["two"]]
DeserializationError: Could not match the object of type "str" to any type of the Union: Literal, Literal
I can have a go if a PR would be accepted?
Hi @davetapley. I think your feature request makes sense, I would gladly accept a PR on this 😃
Feature request for:
Currently gives:
And more realistic use case:
Currently gives:
I can have a go if a PR would be accepted?