title: node.js - express - typeerror: res.json is not a function
body: <p>I am trying to respond to an http request, and I'm getting the following error:</p>
  
  <pre><code>TypeError: req.json is not a function
  </code></pre>
  
  <p>Here is where I call it:</p>
  
  <pre><code>app.get('/', function (req, res) {
  const channel_name = req.query.channel_name;
  const user_name = req.query.user_name;
  const text = req.query.text;
  
  var input = text.split(" ");
  if (input[0] == "move") { // Make move
  
      game.move(user_name, channel_name, input[1], input[2], function(returnGame) {
          req.json(game.getGameStatus(returnGame));
      });
  }
  else {
      var boardSize = 3;
      if (input.length == 2)
          boardSize = input[1];
      var newGame = game.startGame(channel_name, user_name, input[0], boardSize);
      res.json(game.getGameStatus(newGame));
  }
  });
  app.listen(port);
  </code></pre>
  
  <p>game.move and game.startGame both return a JSON called Game. StartGame creates the JSON and returns it, but move loads the JSON from a database and uses a callback to return it. 
  I get the error when I call req.json from the callback, but it works fine for StartGame.</p>
  
  <p>Any ideas? I've been stuck on this all day and can't seem to figure it out. Any help is appreciated, thanks.</p>