fix: add json.Value decoding of floats

This commit is contained in:
CJ van den Berg 2026-03-12 19:40:45 +01:00
parent 42dafe553c
commit ddb7015695
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -974,6 +974,10 @@ fn matchJsonValue(iter_: *[]const u8, v: *json.Value, a: std.mem.Allocator) Erro
v.* = json.Value{ .null = {} }; v.* = json.Value{ .null = {} };
break :ret true; break :ret true;
}, },
cbor_magic_float16, cbor_magic_float32, cbor_magic_float64 => {
v.* = json.Value{ .float = try decodeFloat(f64, &iter, t) };
break :ret true;
},
else => break :ret false, else => break :ret false,
} }
}, },