Allow json to unmarshal empty struct.

This commit is contained in:
Jeroen van Rijn committed 2024-07-21 00:37:11 +02:00
1 parent 572b400d8e
commit fc5ce30f34
2 files changed
+19 -2

No files matched your search

+1 -2
View File
@@ -363,8 +363,7 @@ unmarshal_object :: proc(p: ^Parser, v: any, end_token: Token_Kind) -> (err: Unm
}
v := v
v = reflect.any_base(v)
ti := type_info_of(v.id)
ti := reflect.type_info_base(type_info_of(v.id))
#partial switch t in ti.variant {
case reflect.Type_Info_Struct: