{"action":"created","comment":{"url":"https://api.github.com/repos/flow123d/flow123d/pulls/comments/25426132","id":25426132,"diff_hunk":"@@ -336,21 +336,37 @@ StorageBase * JSONToStorage::make_storage(JSONPath &p, const Type::Record *recor\n {\n     if (p.head()->type() == json_spirit::obj_type) {\n     \tconst json_spirit::mObject & j_map = p.head()->get_obj();\n-    \tstd::set<string> keys_to_processed;\n+    \tstd::set<string> keys_to_process;\n         json_spirit::mObject::const_iterator map_it;\n         std::set<string>::iterator set_it;\n \n         for( map_it = j_map.begin(); map_it != j_map.end(); ++map_it) {\n-           keys_to_processed.insert(map_it->first);\n+           keys_to_process.insert(map_it->first);\n+        }\n+\n+        if (keys_to_process.find(\"TYPE\") != keys_to_process.end()) {\n+            string value;\n+            string ref_address;\n+            p.down( record->key_iterator(\"TYPE\")->key_ );","path":"src/input/json_to_storage.cc","position":17,"original_position":17,"commit_id":"53321413e8b6f511efffa7edca5d5e59d2e0afb7","original_commit_id":"53321413e8b6f511efffa7edca5d5e59d2e0afb7","user":{"login":"jbrezmorf","id":326204,"avatar_url":"https://avatars.githubusercontent.com/u/326204?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrezmorf","html_url":"https://github.com/jbrezmorf","followers_url":"https://api.github.com/users/jbrezmorf/followers","following_url":"https://api.github.com/users/jbrezmorf/following{/other_user}","gists_url":"https://api.github.com/users/jbrezmorf/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrezmorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrezmorf/subscriptions","organizations_url":"https://api.github.com/users/jbrezmorf/orgs","repos_url":"https://api.github.com/users/jbrezmorf/repos","events_url":"https://api.github.com/users/jbrezmorf/events{/privacy}","received_events_url":"https://api.github.com/users/jbrezmorf/received_events","type":"User","site_admin":false},"body":"Rather use same approach as in AbstractRecord. Use try block and catch exception for unknown selection key.\r\nNeed not to deal with ref_path etc. ","created_at":"2015-02-26T13:33:42Z","updated_at":"2015-02-26T13:33:42Z","html_url":"https://github.com/flow123d/flow123d/pull/303#discussion_r25426132","pull_request_url":"https://api.github.com/repos/flow123d/flow123d/pulls/303","_links":{"self":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/comments/25426132"},"html":{"href":"https://github.com/flow123d/flow123d/pull/303#discussion_r25426132"},"pull_request":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/303"}}},"pull_request":{"url":"https://api.github.com/repos/flow123d/flow123d/pulls/303","id":30075988,"html_url":"https://github.com/flow123d/flow123d/pull/303","diff_url":"https://github.com/flow123d/flow123d/pull/303.diff","patch_url":"https://github.com/flow123d/flow123d/pull/303.patch","issue_url":"https://api.github.com/repos/flow123d/flow123d/issues/303","number":303,"state":"open","locked":false,"title":"Df multifield","user":{"login":"jbrezmorf","id":326204,"avatar_url":"https://avatars.githubusercontent.com/u/326204?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrezmorf","html_url":"https://github.com/jbrezmorf","followers_url":"https://api.github.com/users/jbrezmorf/followers","following_url":"https://api.github.com/users/jbrezmorf/following{/other_user}","gists_url":"https://api.github.com/users/jbrezmorf/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrezmorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrezmorf/subscriptions","organizations_url":"https://api.github.com/users/jbrezmorf/orgs","repos_url":"https://api.github.com/users/jbrezmorf/repos","events_url":"https://api.github.com/users/jbrezmorf/events{/privacy}","received_events_url":"https://api.github.com/users/jbrezmorf/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-26T13:10:37Z","updated_at":"2015-02-26T13:33:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44938c42875100fe825f6bbc0b2bf6a25b7c7b57","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flow123d/flow123d/pulls/303/commits","review_comments_url":"https://api.github.com/repos/flow123d/flow123d/pulls/303/comments","review_comment_url":"https://api.github.com/repos/flow123d/flow123d/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flow123d/flow123d/issues/303/comments","statuses_url":"https://api.github.com/repos/flow123d/flow123d/statuses/53321413e8b6f511efffa7edca5d5e59d2e0afb7","head":{"label":"flow123d:DF_multifield","ref":"DF_multifield","sha":"53321413e8b6f511efffa7edca5d5e59d2e0afb7","user":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars.githubusercontent.com/u/5418109?v=3","gravatar_id":"","url":"https://api.github.com/users/flow123d","html_url":"https://github.com/flow123d","followers_url":"https://api.github.com/users/flow123d/followers","following_url":"https://api.github.com/users/flow123d/following{/other_user}","gists_url":"https://api.github.com/users/flow123d/gists{/gist_id}","starred_url":"https://api.github.com/users/flow123d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow123d/subscriptions","organizations_url":"https://api.github.com/users/flow123d/orgs","repos_url":"https://api.github.com/users/flow123d/repos","events_url":"https://api.github.com/users/flow123d/events{/privacy}","received_events_url":"https://api.github.com/users/flow123d/received_events","type":"Organization","site_admin":false},"repo":{"id":13628170,"name":"flow123d","full_name":"flow123d/flow123d","owner":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars.githubusercontent.com/u/5418109?v=3","gravatar_id":"","url":"https://api.github.com/users/flow123d","html_url":"https://github.com/flow123d","followers_url":"https://api.github.com/users/flow123d/followers","following_url":"https://api.github.com/users/flow123d/following{/other_user}","gists_url":"https://api.github.com/users/flow123d/gists{/gist_id}","starred_url":"https://api.github.com/users/flow123d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow123d/subscriptions","organizations_url":"https://api.github.com/users/flow123d/orgs","repos_url":"https://api.github.com/users/flow123d/repos","events_url":"https://api.github.com/users/flow123d/events{/privacy}","received_events_url":"https://api.github.com/users/flow123d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flow123d/flow123d","description":"Main repository of the Flow123d project.","fork":false,"url":"https://api.github.com/repos/flow123d/flow123d","forks_url":"https://api.github.com/repos/flow123d/flow123d/forks","keys_url":"https://api.github.com/repos/flow123d/flow123d/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flow123d/flow123d/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flow123d/flow123d/teams","hooks_url":"https://api.github.com/repos/flow123d/flow123d/hooks","issue_events_url":"https://api.github.com/repos/flow123d/flow123d/issues/events{/number}","events_url":"https://api.github.com/repos/flow123d/flow123d/events","assignees_url":"https://api.github.com/repos/flow123d/flow123d/assignees{/user}","branches_url":"https://api.github.com/repos/flow123d/flow123d/branches{/branch}","tags_url":"https://api.github.com/repos/flow123d/flow123d/tags","blobs_url":"https://api.github.com/repos/flow123d/flow123d/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flow123d/flow123d/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flow123d/flow123d/git/refs{/sha}","trees_url":"https://api.github.com/repos/flow123d/flow123d/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flow123d/flow123d/statuses/{sha}","languages_url":"https://api.github.com/repos/flow123d/flow123d/languages","stargazers_url":"https://api.github.com/repos/flow123d/flow123d/stargazers","contributors_url":"https://api.github.com/repos/flow123d/flow123d/contributors","subscribers_url":"https://api.github.com/repos/flow123d/flow123d/subscribers","subscription_url":"https://api.github.com/repos/flow123d/flow123d/subscription","commits_url":"https://api.github.com/repos/flow123d/flow123d/commits{/sha}","git_commits_url":"https://api.github.com/repos/flow123d/flow123d/git/commits{/sha}","comments_url":"https://api.github.com/repos/flow123d/flow123d/comments{/number}","issue_comment_url":"https://api.github.com/repos/flow123d/flow123d/issues/comments{/number}","contents_url":"https://api.github.com/repos/flow123d/flow123d/contents/{+path}","compare_url":"https://api.github.com/repos/flow123d/flow123d/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flow123d/flow123d/merges","archive_url":"https://api.github.com/repos/flow123d/flow123d/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flow123d/flow123d/downloads","issues_url":"https://api.github.com/repos/flow123d/flow123d/issues{/number}","pulls_url":"https://api.github.com/repos/flow123d/flow123d/pulls{/number}","milestones_url":"https://api.github.com/repos/flow123d/flow123d/milestones{/number}","notifications_url":"https://api.github.com/repos/flow123d/flow123d/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flow123d/flow123d/labels{/name}","releases_url":"https://api.github.com/repos/flow123d/flow123d/releases{/id}","created_at":"2013-10-16T18:56:28Z","updated_at":"2015-02-26T10:36:53Z","pushed_at":"2015-02-26T13:10:04Z","git_url":"git://github.com/flow123d/flow123d.git","ssh_url":"git@github.com:flow123d/flow123d.git","clone_url":"https://github.com/flow123d/flow123d.git","svn_url":"https://github.com/flow123d/flow123d","homepage":"<img> http://dev.nti.tul.cz:8080/job/Flow123d/badge/icon </img>","size":86595,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":110,"forks":3,"open_issues":110,"watchers":2,"default_branch":"master"}},"base":{"label":"flow123d:1.8.0_master","ref":"1.8.0_master","sha":"68b028de7c67c4001457d0e55cdb9f6e84df921d","user":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars.githubusercontent.com/u/5418109?v=3","gravatar_id":"","url":"https://api.github.com/users/flow123d","html_url":"https://github.com/flow123d","followers_url":"https://api.github.com/users/flow123d/followers","following_url":"https://api.github.com/users/flow123d/following{/other_user}","gists_url":"https://api.github.com/users/flow123d/gists{/gist_id}","starred_url":"https://api.github.com/users/flow123d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow123d/subscriptions","organizations_url":"https://api.github.com/users/flow123d/orgs","repos_url":"https://api.github.com/users/flow123d/repos","events_url":"https://api.github.com/users/flow123d/events{/privacy}","received_events_url":"https://api.github.com/users/flow123d/received_events","type":"Organization","site_admin":false},"repo":{"id":13628170,"name":"flow123d","full_name":"flow123d/flow123d","owner":{"login":"flow123d","id":5418109,"avatar_url":"https://avatars.githubusercontent.com/u/5418109?v=3","gravatar_id":"","url":"https://api.github.com/users/flow123d","html_url":"https://github.com/flow123d","followers_url":"https://api.github.com/users/flow123d/followers","following_url":"https://api.github.com/users/flow123d/following{/other_user}","gists_url":"https://api.github.com/users/flow123d/gists{/gist_id}","starred_url":"https://api.github.com/users/flow123d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flow123d/subscriptions","organizations_url":"https://api.github.com/users/flow123d/orgs","repos_url":"https://api.github.com/users/flow123d/repos","events_url":"https://api.github.com/users/flow123d/events{/privacy}","received_events_url":"https://api.github.com/users/flow123d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flow123d/flow123d","description":"Main repository of the Flow123d project.","fork":false,"url":"https://api.github.com/repos/flow123d/flow123d","forks_url":"https://api.github.com/repos/flow123d/flow123d/forks","keys_url":"https://api.github.com/repos/flow123d/flow123d/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flow123d/flow123d/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flow123d/flow123d/teams","hooks_url":"https://api.github.com/repos/flow123d/flow123d/hooks","issue_events_url":"https://api.github.com/repos/flow123d/flow123d/issues/events{/number}","events_url":"https://api.github.com/repos/flow123d/flow123d/events","assignees_url":"https://api.github.com/repos/flow123d/flow123d/assignees{/user}","branches_url":"https://api.github.com/repos/flow123d/flow123d/branches{/branch}","tags_url":"https://api.github.com/repos/flow123d/flow123d/tags","blobs_url":"https://api.github.com/repos/flow123d/flow123d/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flow123d/flow123d/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flow123d/flow123d/git/refs{/sha}","trees_url":"https://api.github.com/repos/flow123d/flow123d/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flow123d/flow123d/statuses/{sha}","languages_url":"https://api.github.com/repos/flow123d/flow123d/languages","stargazers_url":"https://api.github.com/repos/flow123d/flow123d/stargazers","contributors_url":"https://api.github.com/repos/flow123d/flow123d/contributors","subscribers_url":"https://api.github.com/repos/flow123d/flow123d/subscribers","subscription_url":"https://api.github.com/repos/flow123d/flow123d/subscription","commits_url":"https://api.github.com/repos/flow123d/flow123d/commits{/sha}","git_commits_url":"https://api.github.com/repos/flow123d/flow123d/git/commits{/sha}","comments_url":"https://api.github.com/repos/flow123d/flow123d/comments{/number}","issue_comment_url":"https://api.github.com/repos/flow123d/flow123d/issues/comments{/number}","contents_url":"https://api.github.com/repos/flow123d/flow123d/contents/{+path}","compare_url":"https://api.github.com/repos/flow123d/flow123d/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flow123d/flow123d/merges","archive_url":"https://api.github.com/repos/flow123d/flow123d/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flow123d/flow123d/downloads","issues_url":"https://api.github.com/repos/flow123d/flow123d/issues{/number}","pulls_url":"https://api.github.com/repos/flow123d/flow123d/pulls{/number}","milestones_url":"https://api.github.com/repos/flow123d/flow123d/milestones{/number}","notifications_url":"https://api.github.com/repos/flow123d/flow123d/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flow123d/flow123d/labels{/name}","releases_url":"https://api.github.com/repos/flow123d/flow123d/releases{/id}","created_at":"2013-10-16T18:56:28Z","updated_at":"2015-02-26T10:36:53Z","pushed_at":"2015-02-26T13:10:04Z","git_url":"git://github.com/flow123d/flow123d.git","ssh_url":"git@github.com:flow123d/flow123d.git","clone_url":"https://github.com/flow123d/flow123d.git","svn_url":"https://github.com/flow123d/flow123d","homepage":"<img> http://dev.nti.tul.cz:8080/job/Flow123d/badge/icon </img>","size":86595,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":110,"forks":3,"open_issues":110,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/303"},"html":{"href":"https://github.com/flow123d/flow123d/pull/303"},"issue":{"href":"https://api.github.com/repos/flow123d/flow123d/issues/303"},"comments":{"href":"https://api.github.com/repos/flow123d/flow123d/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flow123d/flow123d/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/flow123d/flow123d/statuses/53321413e8b6f511efffa7edca5d5e59d2e0afb7"}}}}