{"action":"created","issue":{"url":"https://api.github.com/repos/pmed/v8pp/issues/7","labels_url":"https://api.github.com/repos/pmed/v8pp/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/pmed/v8pp/issues/7/comments","events_url":"https://api.github.com/repos/pmed/v8pp/issues/7/events","html_url":"https://github.com/pmed/v8pp/issues/7","id":87673458,"number":7,"title":"v8pp::from_v8 and std::vector<std::string>","user":{"login":"vinnitu","id":432168,"avatar_url":"https://avatars.githubusercontent.com/u/432168?v=3","gravatar_id":"","url":"https://api.github.com/users/vinnitu","html_url":"https://github.com/vinnitu","followers_url":"https://api.github.com/users/vinnitu/followers","following_url":"https://api.github.com/users/vinnitu/following{/other_user}","gists_url":"https://api.github.com/users/vinnitu/gists{/gist_id}","starred_url":"https://api.github.com/users/vinnitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinnitu/subscriptions","organizations_url":"https://api.github.com/users/vinnitu/orgs","repos_url":"https://api.github.com/users/vinnitu/repos","events_url":"https://api.github.com/users/vinnitu/events{/privacy}","received_events_url":"https://api.github.com/users/vinnitu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-12T09:46:28Z","updated_at":"2015-06-14T08:17:13Z","closed_at":null,"body":"Can you create example of usage v8pp::from_v8?\r\n\r\nthx"},"comment":{"url":"https://api.github.com/repos/pmed/v8pp/issues/comments/111798822","html_url":"https://github.com/pmed/v8pp/issues/7#issuecomment-111798822","issue_url":"https://api.github.com/repos/pmed/v8pp/issues/7","id":111798822,"user":{"login":"pmed","id":1122386,"avatar_url":"https://avatars.githubusercontent.com/u/1122386?v=3","gravatar_id":"","url":"https://api.github.com/users/pmed","html_url":"https://github.com/pmed","followers_url":"https://api.github.com/users/pmed/followers","following_url":"https://api.github.com/users/pmed/following{/other_user}","gists_url":"https://api.github.com/users/pmed/gists{/gist_id}","starred_url":"https://api.github.com/users/pmed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmed/subscriptions","organizations_url":"https://api.github.com/users/pmed/orgs","repos_url":"https://api.github.com/users/pmed/repos","events_url":"https://api.github.com/users/pmed/events{/privacy}","received_events_url":"https://api.github.com/users/pmed/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T08:17:13Z","updated_at":"2015-06-14T08:17:13Z","body":"I'm going to add a wiki page about data conversion between C++ and V8. Currently please look at the [conversion tests](https://github.com/pmed/v8pp/blob/master/test/test_convert.cpp#L28) how to use them.\r\n\r\nIn brief, `std::vector` is converted to JS array with conversion for each item:\r\n\r\n```c++\r\nstd::vector<std::string> strings = { \"abc\", \"xyz\" };\r\n\r\nauto js_array = v8pp::to_v8(isolate, strings);  // would be [\"abc\", \"xyz\"] in JavaScript\r\n\r\n// v8pp::from_v8 template function needs to know the destination type\r\nauto strings2 = v8pp::from_v8< std::vector<std::string> >(isolate, js_array);\r\n\r\nassert(strings == strings2);\r\n```"}}