api/internal/format/json_writer.go

13 lines
178 B
Go

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