go-json/json.go

8 lines
126 B
Go

package json
func Marshal(v interface{}) ([]byte, error) {
enc := NewEncoder()
defer enc.Release()
return enc.Encode(v)
}