code: func (series SeriesByTarget) MarshalJSONFast(b []byte) ([]byte, error) {
  	b = append(b, '[')
  	for _, s := range series {
  		b = append(b, `{"target":`...)
  		b = strconv.AppendQuoteToASCII(b, s.Target)
  		if len(s.Tags) != 0 {
  			b = append(b, `,"tags":{`...)
  			for name, value := range s.Tags {
  				b = strconv.AppendQuoteToASCII(b, name)
  				b = append(b, ':')
  				b = strconv.AppendQuoteToASCII(b, value)
  				b = append(b, ',')
  			}
  			// Replace trailing comma with a closing bracket
  			b[len(b)-1] = '}'
  		}
  		b = append(b, `,"datapoints":[`...)
  		for _, p := range s.Datapoints {
  			b = append(b, '[')
  			if math.IsNaN(p.Val) {
  				b = append(b, `null,`...)
  			} else {
  				b = strconv.AppendFloat(b, p.Val, 'f', -1, 64)
  				b = append(b, ',')
  			}
  			b = strconv.AppendUint(b, uint64(p.Ts), 10)
  			b = append(b, `],`...)
  		}
  		if len(s.Datapoints) != 0 {
  			b = b[:len(b)-1] // cut last comma
  		}
  		b = append(b, `]},`...)
  	}
  	if len(series) != 0 {
  		b = b[:len(b)-1] // cut last comma
  	}
  	b = append(b, ']')
  	return b, nil
  }
docs: // regular graphite output