From 31d5bc48a7f619f112e66e8cf49057f0811fac69 Mon Sep 17 00:00:00 2001 From: Alexis Caraballo Date: Tue, 29 Oct 2024 01:50:38 -0300 Subject: fix cbor.to_json always returning array of tuples for objects to_json uses a small proc to check if all keys of an object are strings. It was always returning false for any input. --- core/encoding/cbor/cbor.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/encoding') diff --git a/core/encoding/cbor/cbor.odin b/core/encoding/cbor/cbor.odin index 692be0020..8eb829ed3 100644 --- a/core/encoding/cbor/cbor.odin +++ b/core/encoding/cbor/cbor.odin @@ -563,7 +563,7 @@ to_json :: proc(val: Value, allocator := context.allocator) -> (json.Value, mem. case: return false } } - return false + return true } if keys_all_strings(v) { -- cgit v1.2.3