MarshalJSON should be defined on T not *T
Otherwise "%v" format would be used by json.Marshal(T).
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ func (src *BackendKeyData) Encode(dst []byte) []byte {
|
||||
}
|
||||
|
||||
// MarshalJSON implements encoding/json.Marshaler.
|
||||
func (src *BackendKeyData) MarshalJSON() ([]byte, error) {
|
||||
func (src BackendKeyData) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(struct {
|
||||
Type string
|
||||
ProcessID uint32
|
||||
|
||||
Reference in New Issue
Block a user