Fix the json formating.
Add default middleware.