code: func (j *JSONSource) ServeHTTP(w http.ResponseWriter, r *http.Request) {
  	if r.Method != http.MethodPost {
  		err := errors.Errorf("unsupported method: %v, request: %#v", r.Method, r)
  		log.Println(err)
  		http.Error(w, err.Error(), http.StatusMethodNotAllowed)
  		return
  	}
  	jsource := json.NewSource(r.Body)
  	for {
  		stuff, err := jsource.Record()
  		if err == io.EOF {
  			return
  		}
  		if err != nil {
  			err := errors.Wrap(err, "decoding json")
  			log.Println(err)
  			http.Error(w, err.Error(), http.StatusBadRequest)
  			return
  		}
  		j.records <- record{data: stuff}
  	}
  }
docs: // ServeHTTP implements http.Handler for JSONSource