I'm building a simple REST API and I only want to accept JSON input.
I am opting to use app.use(express.json({strict: true}));
instead of app.use(express.bodyParser());
.
I am passing strict: true
thinking that that would add a layer of security against invalid json. Anyone else doing anything similar? Looking for suggestions from someone who was experience with this setup.