Skip to content

Commit 5995295

Browse files
authored
Preserve empty Go slices and maps in JSON (#1528)
1 parent c01a9ee commit 5995295

8 files changed

Lines changed: 326 additions & 124 deletions

File tree

go/canvas.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type CanvasDeclaration struct {
2525
// Description is a short, single-sentence description shown to the agent in canvas catalogs.
2626
Description string `json:"description"`
2727
// InputSchema is the JSON Schema for the `input` payload accepted by `canvas.open`.
28-
InputSchema map[string]any `json:"inputSchema,omitempty"`
28+
InputSchema map[string]any `json:"inputSchema,omitzero"`
2929
// Actions are the agent-callable actions this canvas exposes.
3030
Actions []rpc.CanvasAction `json:"actions,omitempty"`
3131
}

go/rpc/zrpc.go

Lines changed: 60 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/rpc/zrpc_encoding.go

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/rpc/zsession_encoding.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)