Beispiel #1
0
// NewFrameReader implements stream framing for this serializer
func (s *Serializer) NewFrameReader(r io.Reader) io.Reader {
	if s.yaml {
		// TODO: needs document framing
		return nil
	}
	// we need to extract the JSON chunks of data to pass to Decode()
	return framer.NewJSONFramedReader(r)
}
Beispiel #2
0
// NewFrameReader implements stream framing for this serializer
func (jsonFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser {
	// we need to extract the JSON chunks of data to pass to Decode()
	return framer.NewJSONFramedReader(r)
}