Native PostgreSQL driver / client for Zig
0

Configure Feed

Select the types of activity you want to include in your feed.

updated for std.json (#81)

authored by

Ben Jordan and committed by
GitHub
(Aug 3, 2025, 7:19 AM +0800) 6a164b28 cf4d3cc2

+4 -2
+4 -2
src/types.zig
··· 414 414 fn encode(value: anytype, buf: *buffer.Buffer, format_pos: usize) !void { 415 415 buf.writeAt(JSON.encoding, format_pos); 416 416 const state = try Encode.variableLengthStart(buf); 417 - try std.json.stringify(value, .{}, buf.writer()); 417 + var writer = buf.writer().interface; 418 + try std.json.Stringify.value(value, .{}, &writer); 418 419 Encode.variableLengthFill(buf, state); 419 420 } 420 421 }; ··· 436 437 buf.writeAt(JSON.encoding, format_pos); 437 438 const state = try Encode.variableLengthStart(buf); 438 439 try buf.writeByte(1); // jsonb version 439 - try std.json.stringify(value, .{}, buf.writer()); 440 + var writer = buf.writer().interface; 441 + try std.json.Stringify.value(value, .{}, &writer); 440 442 Encode.variableLengthFill(buf, state); 441 443 } 442 444