code: func (mj *JSONLogs) MarshalJSONBuf(buf *bytes.Buffer) error {
  	var first = true
  
  	buf.WriteString(`{`)
  	if len(mj.Log) != 0 {
  		first = false
  		buf.WriteString(`"log":`)
  		ffjsonWriteJSONBytesAsString(buf, mj.Log)
  	}
  	if len(mj.Stream) != 0 {
  		if first {
  			first = false
  		} else {
  			buf.WriteString(`,`)
  		}
  		buf.WriteString(`"stream":`)
  		ffjsonWriteJSONBytesAsString(buf, []byte(mj.Stream))
  	}
  	if len(mj.RawAttrs) > 0 {
  		if first {
  			first = false
  		} else {
  			buf.WriteString(`,`)
  		}
  		buf.WriteString(`"attrs":`)
  		buf.Write(mj.RawAttrs)
  	}
  	if !first {
  		buf.WriteString(`,`)
  	}
  
  	created, err := fastTimeMarshalJSON(mj.Created)
  	if err != nil {
  		return err
  	}
  
  	buf.WriteString(`"time":`)
  	buf.WriteString(created)
  	buf.WriteString(`}`)
  	return nil
  }
docs: // MarshalJSONBuf is an optimized JSON marshaller that avoids reflection
  // and unnecessary allocation.