Adds middleware to parse the body into json