Pin dependencies and update vendors

This commit is contained in:
Wenjia Zhang
2019-10-23 13:37:36 -07:00
parent 9ead9373f3
commit 660b17d0ae
716 changed files with 32002 additions and 21702 deletions

View File

@@ -9,6 +9,9 @@ import (
// with the standard "encoding/json" package of Golang.
// Although it is generally faster for simple proto messages than JSONPb,
// it does not support advanced features of protobuf, e.g. map, oneof, ....
//
// The NewEncoder and NewDecoder types return *json.Encoder and
// *json.Decoder respectively.
type JSONBuiltin struct{}
// ContentType always Returns "application/json".
@@ -35,3 +38,8 @@ func (j *JSONBuiltin) NewDecoder(r io.Reader) Decoder {
func (j *JSONBuiltin) NewEncoder(w io.Writer) Encoder {
return json.NewEncoder(w)
}
// Delimiter for newline encoded JSON streams.
func (j *JSONBuiltin) Delimiter() []byte {
return []byte("\n")
}