code: func (d *YAMLOrJSONDecoder) Decode(into interface{}) error {
  	if d.decoder == nil {
  		buffer, isJSON := guessJSONStream(d.r, d.bufferSize)
  		if isJSON {
  			glog.V(4).Infof("decoding stream as JSON")
  			d.decoder = json.NewDecoder(buffer)
  		} else {
  			glog.V(4).Infof("decoding stream as YAML")
  			d.decoder = NewYAMLToJSONDecoder(buffer)
  		}
  	}
  	return d.decoder.Decode(into)
  }
docs: // Decode unmarshals the next object from the underlying stream into the
  // provide object, or returns an error.