MarshalJSON should be defined on T not *T
Otherwise "%v" format would be used by json.Marshal(T).
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user