2
0

MarshalJSON should be defined on T not *T

Otherwise "%v" format would be used by json.Marshal(T).
This commit is contained in:
Jack Christensen
2019-08-27 21:13:45 -05:00
parent 432c2951c7
commit 76538434cf
34 changed files with 34 additions and 34 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ func (src *Bind) Encode(dst []byte) []byte {
}
// MarshalJSON implements encoding/json.Marshaler.
func (src *Bind) MarshalJSON() ([]byte, error) {
func (src Bind) MarshalJSON() ([]byte, error) {
formattedParameters := make([]map[string]string, len(src.Parameters))
for i, p := range src.Parameters {
if p == nil {