Skip to content

Commit d3b2fa1

Browse files
committed
types: fix gojay implements methods
1 parent 8535762 commit d3b2fa1

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

types.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package jsonrpc2
77
import (
88
"strconv"
99

10+
"github.com/francoispqt/gojay"
1011
jsoniter "github.com/json-iterator/go"
1112
)
1213

@@ -70,7 +71,7 @@ type Request struct {
7071
Method string `json:"method"`
7172

7273
// The method's params.
73-
Params []byte `json:"params,omitempty"`
74+
Params *gojay.EmbeddedJSON `json:"params,omitempty"`
7475
}
7576

7677
// IsNotify returns true if this request is a notification.
@@ -94,7 +95,7 @@ type Response struct {
9495

9596
// The result of a request. This member is REQUIRED on success.
9697
// This member MUST NOT exist if there was an error invoking the method.
97-
Result []byte `json:"result,omitempty"`
98+
Result *gojay.EmbeddedJSON `json:"result,omitempty"`
9899
}
99100

100101
// NotificationMessage is a notification message.

types_gen.go

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

0 commit comments

Comments
 (0)