We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d178c85 commit d54db1cCopy full SHA for d54db1c
.changelog/_unreleased.toml
@@ -0,0 +1,5 @@
1
+[[entries]]
2
+id = "6d0f41f2-f7f9-4808-af65-196a7a909b4f"
3
+type = "fix"
4
+description = "Fix #47: Union with Literal in them can now de/serialize"
5
+author = "@rhaps0dy"
databind/src/databind/json/tests/converters_test.py
@@ -726,3 +726,9 @@ def test_union_literal():
726
727
assert mapper.serialize("bye", StrType) == "bye"
728
assert mapper.serialize("other", StrType) == "other"
729
+
730
+ assert mapper.deserialize("hi", IntType) == "hi"
731
+ assert mapper.deserialize(2, IntType) == 2
732
733
+ assert mapper.deserialize("bye", StrType) == "bye"
734
+ assert mapper.deserialize("other", StrType) == "other"
0 commit comments