added support for for json encoding in httpmodule for nodejs