diff --git a/src/cbor.zig b/src/cbor.zig index 5009b17..8f0e186 100644 --- a/src/cbor.zig +++ b/src/cbor.zig @@ -1141,7 +1141,9 @@ fn GenericExtractorAlloc(T: type) type { } pub fn extract(self: Self, iter: *[]const u8) Error!bool { - if (comptime isExtractableAlloc(T)) { + if (comptime T == json.Value) { + return matchJsonValue(iter, self.dest, self.allocator); + } else if (comptime isExtractableAlloc(T)) { return self.dest.cborExtract(iter, self.allocator); } else { switch (comptime @typeInfo(T)) {