Gets the whole content in the request as a json to the property json
$ npm install jsonparserconst jsonparser = require('jsonparser');This middleware adds a req.json property which contains the JSON parsed request body
stricta truthy value to check for content type header (default: false).typerequest content-type to parse (default: json).bodyChecka truthy value for empty body check (default: false).
const bodyparser = require('simple-bodyparser');
const jsonparser = require('jsonparser');
const app = require('express')();
app.use(bodyparser());
app.use(jsonparser());
app.use(function(req, res, next){
let body = req.json
});