{"action":"created","comment":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/40415627","id":40415627,"diff_hunk":"@@ -0,0 +1,99 @@\n+/*\n+*\n+* Copyright 2013 Telefonica Investigacion y Desarrollo, S.A.U\n+*\n+* This file is part of Orion Context Broker.\n+*\n+* Orion Context Broker is free software: you can redistribute it and/or\n+* modify it under the terms\n+* of the GNU Affero General Public License as\n+* published by the Free Software Foundation, either version 3 of the\n+* License, or (at your option) any later version.\n+*\n+* Orion Context Broker is distributed in the hope that it will be useful,\n+* but WITHOUT ANY WARRANTY; without even the implied warranty of\n+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n+* General Public License for more details.\n+*\n+* You should have received a copy of the GNU Affero General Public License\n+* along with Orion Context Broker. If not, see http://www.gnu.org/licenses/.\n+*\n+* For those usages not covered by this license please contact with\n+* iot_support at tid dot es\n+*\n+* Author: Orion dev team\n+*/\n+#include \"common/JsonHelper.h\"\n+\n+std::string toJsonString(const std::string& input)\n+{\n+  std::ostringstream ss;\n+  ss << '\"';\n+  for (std::string::const_iterator iter = input.begin(); iter != input.end(); ++iter) {\n+        switch (*iter) {\n+            case '\\\\': ss << \"\\\\\\\\\"; break;\n+            case '\"': ss << \"\\\\\\\"\"; break;\n+            case '/': ss << \"\\\\/\"; break;\n+            case '\\b': ss << \"\\\\b\"; break;\n+            case '\\f': ss << \"\\\\f\"; break;\n+            case '\\n': ss << \"\\\\n\"; break;\n+            case '\\r': ss << \"\\\\r\"; break;\n+            case '\\t': ss << \"\\\\t\"; break;\n+            default: ss << *iter; break;\n+      }\n+  }\n+  ss << '\"';\n+  return ss.str();\n+}\n+\n+template <>\n+std::string vectorToJson(std::vector<std::string> &list)\n+{\n+  switch (list.size())\n+    {\n+    case 0:\n+      return \"[]\";","path":"src/lib/common/JsonHelper.cpp","position":null,"original_position":55,"commit_id":"fd1bc7d3468f33df1a46f6f9b558af3ae820b24c","original_commit_id":"b21afdceb2e725c3163cbc41b78c2106d3698b03","user":{"login":"crbrox","id":1384296,"avatar_url":"https://avatars.githubusercontent.com/u/1384296?v=3","gravatar_id":"","url":"https://api.github.com/users/crbrox","html_url":"https://github.com/crbrox","followers_url":"https://api.github.com/users/crbrox/followers","following_url":"https://api.github.com/users/crbrox/following{/other_user}","gists_url":"https://api.github.com/users/crbrox/gists{/gist_id}","starred_url":"https://api.github.com/users/crbrox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crbrox/subscriptions","organizations_url":"https://api.github.com/users/crbrox/orgs","repos_url":"https://api.github.com/users/crbrox/repos","events_url":"https://api.github.com/users/crbrox/events{/privacy}","received_events_url":"https://api.github.com/users/crbrox/received_events","type":"User","site_admin":false},"body":"hopefully fixed 82e1760","created_at":"2015-09-25T10:02:20Z","updated_at":"2015-09-25T10:02:20Z","html_url":"https://github.com/telefonicaid/fiware-orion/pull/1284#discussion_r40415627","pull_request_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1284","_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/40415627"},"html":{"href":"https://github.com/telefonicaid/fiware-orion/pull/1284#discussion_r40415627"},"pull_request":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1284"}}},"pull_request":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1284","id":45810207,"html_url":"https://github.com/telefonicaid/fiware-orion/pull/1284","diff_url":"https://github.com/telefonicaid/fiware-orion/pull/1284.diff","patch_url":"https://github.com/telefonicaid/fiware-orion/pull/1284.patch","issue_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1284","number":1284,"state":"open","locked":false,"title":"Add getAllSubscriptions w/o backend","user":{"login":"crbrox","id":1384296,"avatar_url":"https://avatars.githubusercontent.com/u/1384296?v=3","gravatar_id":"","url":"https://api.github.com/users/crbrox","html_url":"https://github.com/crbrox","followers_url":"https://api.github.com/users/crbrox/followers","following_url":"https://api.github.com/users/crbrox/following{/other_user}","gists_url":"https://api.github.com/users/crbrox/gists{/gist_id}","starred_url":"https://api.github.com/users/crbrox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crbrox/subscriptions","organizations_url":"https://api.github.com/users/crbrox/orgs","repos_url":"https://api.github.com/users/crbrox/repos","events_url":"https://api.github.com/users/crbrox/events{/privacy}","received_events_url":"https://api.github.com/users/crbrox/received_events","type":"User","site_admin":false},"body":"BE not implemented yet","created_at":"2015-09-23T17:56:00Z","updated_at":"2015-09-25T10:02:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9427dd8cad03a33a2f492d251dd0c7ef60c23ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1284/commits","review_comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1284/comments","review_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1284/comments","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/fd1bc7d3468f33df1a46f6f9b558af3ae820b24c","head":{"label":"telefonicaid:feature/1126_get_subscription_list","ref":"feature/1126_get_subscription_list","sha":"fd1bc7d3468f33df1a46f6f9b558af3ae820b24c","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":12808420,"name":"fiware-orion","full_name":"telefonicaid/fiware-orion","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-orion","description":"FIWARE Orion Context Broker","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-orion","forks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-orion/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-orion/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-orion/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments{/number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-orion/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-orion/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-orion/releases{/id}","created_at":"2013-09-13T11:55:25Z","updated_at":"2015-09-18T15:15:11Z","pushed_at":"2015-09-25T10:01:38Z","git_url":"git://github.com/telefonicaid/fiware-orion.git","ssh_url":"git@github.com:telefonicaid/fiware-orion.git","clone_url":"https://github.com/telefonicaid/fiware-orion.git","svn_url":"https://github.com/telefonicaid/fiware-orion","homepage":"http://catalogue.fiware.org/enablers/publishsubscribe-context-broker-orion-context-broker","size":28175,"stargazers_count":30,"watchers_count":30,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":40,"mirror_url":null,"open_issues_count":199,"forks":40,"open_issues":199,"watchers":30,"default_branch":"develop"}},"base":{"label":"telefonicaid:develop","ref":"develop","sha":"9ff3e670132c711016d345629a7a7d1819e207d7","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":12808420,"name":"fiware-orion","full_name":"telefonicaid/fiware-orion","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-orion","description":"FIWARE Orion Context Broker","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-orion","forks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-orion/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-orion/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-orion/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments{/number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-orion/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-orion/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-orion/releases{/id}","created_at":"2013-09-13T11:55:25Z","updated_at":"2015-09-18T15:15:11Z","pushed_at":"2015-09-25T10:01:38Z","git_url":"git://github.com/telefonicaid/fiware-orion.git","ssh_url":"git@github.com:telefonicaid/fiware-orion.git","clone_url":"https://github.com/telefonicaid/fiware-orion.git","svn_url":"https://github.com/telefonicaid/fiware-orion","homepage":"http://catalogue.fiware.org/enablers/publishsubscribe-context-broker-orion-context-broker","size":28175,"stargazers_count":30,"watchers_count":30,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":40,"mirror_url":null,"open_issues_count":199,"forks":40,"open_issues":199,"watchers":30,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1284"},"html":{"href":"https://github.com/telefonicaid/fiware-orion/pull/1284"},"issue":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1284"},"comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1284/comments"},"review_comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1284/comments"},"review_comment":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1284/commits"},"statuses":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/fd1bc7d3468f33df1a46f6f9b558af3ae820b24c"}}}}