示例#1
0
文件: json.go 项目: CNDonny/scope
// 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)
}
示例#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)
}