Commit c86fa75a authored by Adin Schmahmann's avatar Adin Schmahmann

fix: properly emit JSON strings for empty maps in pin and pinStatus objects

parent fa6705a1
...@@ -36,7 +36,7 @@ func (p *pinObject) MarshalJSON() ([]byte, error) { ...@@ -36,7 +36,7 @@ func (p *pinObject) MarshalJSON() ([]byte, error) {
} }
} }
var metaStr string metaStr := "{}"
if meta := p.GetMeta(); meta != nil { if meta := p.GetMeta(); meta != nil {
metaBytes, err := json.Marshal(meta) metaBytes, err := json.Marshal(meta)
if err == nil { if err == nil {
...@@ -138,7 +138,7 @@ func (p *pinStatusObject) MarshalJSON() ([]byte, error) { ...@@ -138,7 +138,7 @@ func (p *pinStatusObject) MarshalJSON() ([]byte, error) {
} }
} }
var infoStr string infoStr := "{}"
if info := p.GetInfo(); info != nil { if info := p.GetInfo(); info != nil {
infoBytes, err := json.Marshal(info) infoBytes, err := json.Marshal(info)
if err == nil { if err == nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment