Skip to content

Commit

Permalink
fix(rpc): mark some fields as omitempty
Browse files Browse the repository at this point in the history
Resolves #12
  • Loading branch information
andrewmbenton committed Dec 12, 2024
1 parent d661166 commit e9b230f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ type Stream interface {
}

type Message struct {
ID *json.Number `json:"id"`
ID *json.Number `json:"id,omitempty"`
JsonRPC *string `json:"jsonrpc"`
Method *string `json:"method"`
Params *json.RawMessage `json:"params"`
Method *string `json:"method,omitempty"`
Params *json.RawMessage `json:"params,omitempty"`
Result *json.RawMessage `json:"result,omitempty"`
Error *ErrorDetail `json:"error,omitempty"`
}
Expand Down

0 comments on commit e9b230f

Please sign in to comment.