go-json/json.go

8 lines
126 B
Go
Raw Normal View History

2020-04-19 13:51:22 +03:00
package json
func Marshal(v interface{}) ([]byte, error) {
enc := NewEncoder()
defer enc.Release()
return enc.Encode(v)
}