api/internal/format/json_writer.go

14 lines
178 B
Go
Raw Normal View History

package format
import (
"encoding/json"
)
type jsonWriter struct {
encoder *json.Encoder
}
func (j *jsonWriter) Write(in interface{}) error {
return j.encoder.Encode(in)
}