aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Caraballo <alexiscaraballo96@gmail.com>2024-10-29 01:50:38 -0300
committerGitHub <noreply@github.com>2024-10-29 01:50:38 -0300
commit31d5bc48a7f619f112e66e8cf49057f0811fac69 (patch)
treed6febb63e4e377a06d51b60671da5c51d4e1e616
parent5f99d6b42723edd1ed3aa145e5b7c6d56960e33e (diff)
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.
-rw-r--r--core/encoding/cbor/cbor.odin2
1 files changed, 1 insertions, 1 deletions
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) {