mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
* fixes #21638; `fromJson` should supports empty objects
* complete the logic
(cherry picked from commit 5e016e4466)
This commit is contained in:
@@ -409,6 +409,11 @@ template fn() =
|
||||
doAssert foo.c == 0
|
||||
doAssert foo.c0 == 42
|
||||
|
||||
block: # bug #21638
|
||||
type Something = object
|
||||
|
||||
doAssert "{}".parseJson.jsonTo(Something) == Something()
|
||||
|
||||
when false:
|
||||
## TODO: Implement support for nested variant objects allowing the tests
|
||||
## bellow to pass.
|
||||
|
||||
Reference in New Issue
Block a user