x/encoding/json/json.go
2020-08-18 17:47:14 -07:00

15 lines
226 B
Go

package json
import (
"encoding/json"
"io"
)
func Encoder(w io.Writer, e interface{}) error {
return json.NewEncoder(w).Encode(e)
}
func Decoder(r io.Reader, e interface{}) error {
return json.NewDecoder(r).Decode(e)
}