From 994825671d53c0a165854e17c7498e2000e0e21c Mon Sep 17 00:00:00 2001 From: jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> Date: Fri, 14 Apr 2023 15:05:25 +0200 Subject: [PATCH 1/2] Handle unmarshalling to json.Value --- core/encoding/json/unmarshal.odin | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/encoding/json/unmarshal.odin b/core/encoding/json/unmarshal.odin index 1e8ec0e0d..09a7bc938 100644 --- a/core/encoding/json/unmarshal.odin +++ b/core/encoding/json/unmarshal.odin @@ -215,6 +215,12 @@ unmarshal_value :: proc(p: ^Parser, v: any) -> (err: Unmarshal_Error) { } } + switch dst in &v { + // Handle json.Value as an unknown type + case Value: + dst = parse_value(p) or_return + return + } #partial switch token.kind { case .Null: From a6d5f9877f489002b00153b67d13b04fb8c20c55 Mon Sep 17 00:00:00 2001 From: jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> Date: Fri, 14 Apr 2023 17:27:52 +0200 Subject: [PATCH 2/2] Convert indentation to tabs --- core/encoding/json/unmarshal.odin | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/encoding/json/unmarshal.odin b/core/encoding/json/unmarshal.odin index 09a7bc938..e6c61d8fa 100644 --- a/core/encoding/json/unmarshal.odin +++ b/core/encoding/json/unmarshal.odin @@ -215,12 +215,12 @@ unmarshal_value :: proc(p: ^Parser, v: any) -> (err: Unmarshal_Error) { } } - switch dst in &v { - // Handle json.Value as an unknown type - case Value: - dst = parse_value(p) or_return - return - } + switch dst in &v { + // Handle json.Value as an unknown type + case Value: + dst = parse_value(p) or_return + return + } #partial switch token.kind { case .Null: