@@ -57,147 +57,147 @@ var _ json.Marshaler = (*RawMessage)(nil)
57
57
var _ json.Unmarshaler = (* RawMessage )(nil )
58
58
59
59
// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject
60
- func (v * wireRequest ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
60
+ func (r * wireRequest ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
61
61
switch k {
62
62
case keyJSONRPC :
63
- return dec .String (& v .JSONRPC )
63
+ return dec .String (& r .JSONRPC )
64
64
case keyID :
65
- s := v .ID .String ()
65
+ s := r .ID .String ()
66
66
return dec .String (& s )
67
67
case keyMethod :
68
- return dec .String (& v .Method )
68
+ return dec .String (& r .Method )
69
69
case keyParams :
70
- if v .Params == nil {
71
- v .Params = & json.RawMessage {}
70
+ if r .Params == nil {
71
+ r .Params = & json.RawMessage {}
72
72
}
73
- return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(v .Params ))
73
+ return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(r .Params ))
74
74
}
75
75
return nil
76
76
}
77
77
78
78
// NKeys returns the number of keys to unmarshal
79
- func (v * wireRequest ) NKeys () int { return 4 }
79
+ func (r * wireRequest ) NKeys () int { return 4 }
80
80
81
81
// MarshalJSONObject implements gojay's MarshalerJSONObject
82
- func (v * wireRequest ) MarshalJSONObject (enc * gojay.Encoder ) {
83
- enc .StringKey (keyJSONRPC , v .JSONRPC )
84
- enc .StringKey (keyID , v .ID .String ())
85
- enc .StringKey (keyMethod , v .Method )
86
- enc .AddEmbeddedJSONKeyOmitEmpty (keyParams , (* gojay .EmbeddedJSON )(v .Params ))
82
+ func (r * wireRequest ) MarshalJSONObject (enc * gojay.Encoder ) {
83
+ enc .StringKey (keyJSONRPC , r .JSONRPC )
84
+ enc .StringKey (keyID , r .ID .String ())
85
+ enc .StringKey (keyMethod , r .Method )
86
+ enc .AddEmbeddedJSONKeyOmitEmpty (keyParams , (* gojay .EmbeddedJSON )(r .Params ))
87
87
}
88
88
89
89
// IsNil returns wether the structure is nil value or not
90
- func (v * wireRequest ) IsNil () bool { return v == nil }
90
+ func (r * wireRequest ) IsNil () bool { return r == nil }
91
91
92
92
// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject
93
- func (v * wireResponse ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
93
+ func (r * wireResponse ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
94
94
switch k {
95
95
case keyJSONRPC :
96
- return dec .String (& v .JSONRPC )
96
+ return dec .String (& r .JSONRPC )
97
97
case keyID :
98
- s := v .ID .String ()
98
+ s := r .ID .String ()
99
99
return dec .String (& s )
100
100
case keyError :
101
- if v .Error == nil {
102
- v .Error = & Error {}
101
+ if r .Error == nil {
102
+ r .Error = & Error {}
103
103
}
104
- return dec .Object (v .Error )
104
+ return dec .Object (r .Error )
105
105
case keyResult :
106
- if v .Result == nil {
107
- v .Result = & json.RawMessage {}
106
+ if r .Result == nil {
107
+ r .Result = & json.RawMessage {}
108
108
}
109
- return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(v .Result ))
109
+ return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(r .Result ))
110
110
}
111
111
return nil
112
112
}
113
113
114
114
// NKeys returns the number of keys to unmarshal
115
- func (v * wireResponse ) NKeys () int { return 4 }
115
+ func (r * wireResponse ) NKeys () int { return 4 }
116
116
117
117
// MarshalJSONObject implements gojay's MarshalerJSONObject
118
- func (v * wireResponse ) MarshalJSONObject (enc * gojay.Encoder ) {
119
- enc .StringKey (keyJSONRPC , v .JSONRPC )
120
- enc .StringKey (keyID , v .ID .String ())
121
- enc .ObjectKeyOmitEmpty (keyError , v .Error )
122
- enc .AddEmbeddedJSONKeyOmitEmpty (keyResult , (* gojay .EmbeddedJSON )(v .Result ))
118
+ func (r * wireResponse ) MarshalJSONObject (enc * gojay.Encoder ) {
119
+ enc .StringKey (keyJSONRPC , r .JSONRPC )
120
+ enc .StringKey (keyID , r .ID .String ())
121
+ enc .ObjectKeyOmitEmpty (keyError , r .Error )
122
+ enc .AddEmbeddedJSONKeyOmitEmpty (keyResult , (* gojay .EmbeddedJSON )(r .Result ))
123
123
}
124
124
125
125
// IsNil returns wether the structure is nil value or not
126
- func (v * wireResponse ) IsNil () bool { return v == nil }
126
+ func (r * wireResponse ) IsNil () bool { return r == nil }
127
127
128
128
// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject
129
- func (v * Combined ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
129
+ func (r * Combined ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
130
130
switch k {
131
131
case keyJSONRPC :
132
- return dec .String (& v .JSONRPC )
132
+ return dec .String (& r .JSONRPC )
133
133
case keyID :
134
- if v .ID == nil {
135
- v .ID = & ID {}
134
+ if r .ID == nil {
135
+ r .ID = & ID {}
136
136
}
137
- s := v .ID .String ()
137
+ s := r .ID .String ()
138
138
return dec .String (& s )
139
139
case keyMethod :
140
- return dec .String (& v .Method )
140
+ return dec .String (& r .Method )
141
141
case keyParams :
142
- if v .Params == nil {
143
- v .Params = & json.RawMessage {}
142
+ if r .Params == nil {
143
+ r .Params = & json.RawMessage {}
144
144
}
145
- return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(v .Params ))
145
+ return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(r .Params ))
146
146
case keyError :
147
- if v .Error == nil {
148
- v .Error = & Error {}
147
+ if r .Error == nil {
148
+ r .Error = & Error {}
149
149
}
150
- return dec .Object (v .Error )
150
+ return dec .Object (r .Error )
151
151
case keyResult :
152
- if v .Result == nil {
153
- v .Result = & json.RawMessage {}
152
+ if r .Result == nil {
153
+ r .Result = & json.RawMessage {}
154
154
}
155
- return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(v .Result ))
155
+ return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(r .Result ))
156
156
}
157
157
return nil
158
158
}
159
159
160
160
// NKeys returns the number of keys to unmarshal
161
- func (v * Combined ) NKeys () int { return 6 }
161
+ func (r * Combined ) NKeys () int { return 6 }
162
162
163
163
// MarshalJSONObject implements gojay's MarshalerJSONObject
164
- func (v * Combined ) MarshalJSONObject (enc * gojay.Encoder ) {
165
- enc .StringKey (keyJSONRPC , v .JSONRPC )
166
- enc .StringKeyOmitEmpty (keyID , v .ID .String ())
167
- enc .StringKey (keyMethod , v .Method )
168
- enc .AddEmbeddedJSONKeyOmitEmpty (keyParams , (* gojay .EmbeddedJSON )(v .Params ))
169
- enc .ObjectKeyOmitEmpty (keyError , v .Error )
170
- enc .AddEmbeddedJSONKeyOmitEmpty (keyResult , (* gojay .EmbeddedJSON )(v .Result ))
164
+ func (r * Combined ) MarshalJSONObject (enc * gojay.Encoder ) {
165
+ enc .StringKey (keyJSONRPC , r .JSONRPC )
166
+ enc .StringKeyOmitEmpty (keyID , r .ID .String ())
167
+ enc .StringKey (keyMethod , r .Method )
168
+ enc .AddEmbeddedJSONKeyOmitEmpty (keyParams , (* gojay .EmbeddedJSON )(r .Params ))
169
+ enc .ObjectKeyOmitEmpty (keyError , r .Error )
170
+ enc .AddEmbeddedJSONKeyOmitEmpty (keyResult , (* gojay .EmbeddedJSON )(r .Result ))
171
171
}
172
172
173
173
// IsNil returns wether the structure is nil value or not
174
- func (v * Combined ) IsNil () bool { return v == nil }
174
+ func (r * Combined ) IsNil () bool { return r == nil }
175
175
176
176
// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject
177
- func (v * NotificationMessage ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
177
+ func (m * NotificationMessage ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
178
178
switch k {
179
179
case keyJSONRPC :
180
- return dec .String (& v .JSONRPC )
180
+ return dec .String (& m .JSONRPC )
181
181
case keyMethod :
182
- return dec .String (& v .Method )
182
+ return dec .String (& m .Method )
183
183
case keyParams :
184
- if v .Params == nil {
185
- v .Params = & json.RawMessage {}
184
+ if m .Params == nil {
185
+ m .Params = & json.RawMessage {}
186
186
}
187
- return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(v .Params ))
187
+ return dec .EmbeddedJSON ((* gojay .EmbeddedJSON )(m .Params ))
188
188
}
189
189
return nil
190
190
}
191
191
192
192
// NKeys returns the number of keys to unmarshal
193
- func (v * NotificationMessage ) NKeys () int { return 3 }
193
+ func (m * NotificationMessage ) NKeys () int { return 3 }
194
194
195
195
// MarshalJSONObject implements gojay's MarshalerJSONObject
196
- func (v * NotificationMessage ) MarshalJSONObject (enc * gojay.Encoder ) {
197
- enc .StringKey (keyJSONRPC , v .JSONRPC )
198
- enc .StringKey (keyMethod , v .Method )
199
- enc .AddEmbeddedJSONKeyOmitEmpty (keyParams , (* gojay .EmbeddedJSON )(v .Params ))
196
+ func (m * NotificationMessage ) MarshalJSONObject (enc * gojay.Encoder ) {
197
+ enc .StringKey (keyJSONRPC , m .JSONRPC )
198
+ enc .StringKey (keyMethod , m .Method )
199
+ enc .AddEmbeddedJSONKeyOmitEmpty (keyParams , (* gojay .EmbeddedJSON )(m .Params ))
200
200
}
201
201
202
202
// IsNil returns wether the structure is nil value or not
203
- func (v * NotificationMessage ) IsNil () bool { return v == nil }
203
+ func (m * NotificationMessage ) IsNil () bool { return m == nil }
0 commit comments