{"action":"closed","issue":{"url":"https://api.github.com/repos/rvagg/nan/issues/250","labels_url":"https://api.github.com/repos/rvagg/nan/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/rvagg/nan/issues/250/comments","events_url":"https://api.github.com/repos/rvagg/nan/issues/250/events","html_url":"https://github.com/rvagg/nan/issues/250","id":54748376,"number":250,"title":"Add support for node::Encode/DecodeBytes/DecodeWrite","user":{"login":"royaltm","id":615066,"avatar_url":"https://avatars.githubusercontent.com/u/615066?v=3","gravatar_id":"","url":"https://api.github.com/users/royaltm","html_url":"https://github.com/royaltm","followers_url":"https://api.github.com/users/royaltm/followers","following_url":"https://api.github.com/users/royaltm/following{/other_user}","gists_url":"https://api.github.com/users/royaltm/gists{/gist_id}","starred_url":"https://api.github.com/users/royaltm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/royaltm/subscriptions","organizations_url":"https://api.github.com/users/royaltm/orgs","repos_url":"https://api.github.com/users/royaltm/repos","events_url":"https://api.github.com/users/royaltm/events{/privacy}","received_events_url":"https://api.github.com/users/royaltm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-19T10:37:19Z","updated_at":"2015-01-21T11:52:05Z","closed_at":"2015-01-21T11:52:05Z","body":"Could you add support for those handy utils?\r\n\r\n```cpp\r\n#if NODE_VERSION_AT_LEAST(0,11,12)\r\n#define NanEncode(buf, buflen, encoding) \\\r\n  node::Encode(v8::Isolate::GetCurrent(), buf, buflen, encoding)\r\n#define NanDecodeBytes(val, encoding) \\\r\n  node::DecodeBytes(v8::Isolate::GetCurrent(), val, encoding)\r\n#define NanDecodeWrite(buf, buflen, val, encoding) \\\r\n  node::DecodeWrite(v8::Isolate::GetCurrent(), buf, buflen, val, encoding)\r\n#else\r\n#define NanEncode(buf, buflen, encoding) \\\r\n  node::Encode(buf, buflen, encoding)\r\n#define NanDecodeBytes(val, encoding) \\\r\n  node::DecodeBytes(val, encoding)\r\n#define NanDecodeWrite(buf, buflen, val, encoding) \\\r\n  node::DecodeWrite(buf, buflen, val, encoding)\r\n#endif\r\n```"}}