From 8063788e13b746621f293bec4b6b4aa5bae479fc Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 17 Mar 2026 14:35:42 -0700 Subject: [PATCH] Match Go Query: quote JSON keys in output records Go's ToJson produces valid JSON with quoted keys like {"name":"Alice"}. Rust was producing invalid JSON with unquoted keys like {name:"Alice"}. --- seaweed-volume/src/server/grpc_server.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/seaweed-volume/src/server/grpc_server.rs b/seaweed-volume/src/server/grpc_server.rs index ab4577acc..e400baaaa 100644 --- a/seaweed-volume/src/server/grpc_server.rs +++ b/seaweed-volume/src/server/grpc_server.rs @@ -3393,13 +3393,15 @@ impl VolumeServer for VolumeGrpcService { } } - // Build output record: {selection:value,...} (Go's ToJson format) + // Build output record: {"selection":value,...} (Go's ToJson format) records.push(b'{'); for (i, sel) in req.selections.iter().enumerate() { if i > 0 { records.push(b','); } + records.push(b'"'); records.extend_from_slice(sel.as_bytes()); + records.push(b'"'); records.push(b':'); let val = &parsed[sel]; let raw = if val.is_null() {