소스 검색

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.
Alexis Caraballo 10 달 전
부모
커밋
d9326ae93d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/encoding/cbor/cbor.odin

+ 1 - 1
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) {