Skip to content

Commit

Permalink
Convert bytes to string on struct
Browse files Browse the repository at this point in the history
  • Loading branch information
verzth committed Mar 11, 2020
1 parent f17e979 commit 503b2de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions JSON.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ func (j JSON) IsNull() bool {
func (j JSON) Equals(j1 JSON) bool {
return bytes.Equal([]byte(j), []byte(j1))
}

func (j JSON) String() string {
buffer, _ := j.MarshalJSON()
return string(buffer)
}

0 comments on commit 503b2de

Please sign in to comment.