Marshalling middleware for Node