@@ -8,16 +8,16 @@ package jsonrpc2
8
8
9
9
import "github.com/francoispqt/gojay"
10
10
11
- // MarshalJSONObject implements gojay's MarshalerJSONObject
11
+ // MarshalJSONObject implements gojay. MarshalerJSONObject.
12
12
func (e * Error ) MarshalJSONObject (enc * gojay.Encoder ) {
13
13
enc .IntKey (keyCode , int (e .Code ))
14
14
enc .StringKey (keyMessage , e .Message )
15
15
}
16
16
17
- // IsNil returns wether the structure is nil value or not
17
+ // IsNil implements gojay.MarshalerJSONObject.
18
18
func (e * Error ) IsNil () bool { return e == nil }
19
19
20
- // UnmarshalJSONObject implements gojay's UnmarshalerJSONObject
20
+ // UnmarshalJSONObject implements gojay. UnmarshalerJSONObject.
21
21
func (e * Error ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
22
22
switch k {
23
23
case keyCode :
@@ -28,11 +28,11 @@ func (e *Error) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
28
28
return nil
29
29
}
30
30
31
- // NKeys returns the number of keys to unmarshal
31
+ // NKeys implements gojay.UnmarshalerJSONObject.
32
32
func (e * Error ) NKeys () int { return 2 }
33
33
34
- // compile time check whether the Error implements a gojay.MarshalerJSONObject interface .
35
- var _ gojay. MarshalerJSONObject = ( * Error )( nil )
36
-
37
- // compile time check whether the Error implements a gojay.UnmarshalerJSONObject interface.
38
- var _ gojay. UnmarshalerJSONObject = ( * Error )( nil )
34
+ // compile time check whether the Error implements a gojay.MarshalerJSONObject and gojay.UnmarshalerJSONObject interfaces .
35
+ var (
36
+ _ gojay. MarshalerJSONObject = ( * Error )( nil )
37
+ _ gojay.UnmarshalerJSONObject = ( * Error )( nil )
38
+ )
0 commit comments