fix: extractAlloc of json.Values from arrays

This commit is contained in:
CJ van den Berg 2026-03-12 20:32:05 +01:00
parent 2a23d8f54b
commit 36bf0aea8f
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -1141,7 +1141,9 @@ fn GenericExtractorAlloc(T: type) type {
} }
pub fn extract(self: Self, iter: *[]const u8) Error!bool { 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); return self.dest.cborExtract(iter, self.allocator);
} else { } else {
switch (comptime @typeInfo(T)) { switch (comptime @typeInfo(T)) {