A simple middleware for mounting a RESTful JSON API