{"action":"created","comment":{"url":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments/37061666","id":37061666,"diff_hunk":"@@ -597,34 +598,15 @@ ecma_builtin_json_parse_value (ecma_json_token_t *token_p) /**< token argument *\n       bool parse_comma = false;\n       uint32_t length = 0;\n \n-#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN\n-      ecma_object_t *array_prototype_p = ecma_builtin_get (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE);\n-#else /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN */\n-      ecma_object_t *array_prototype_p = ecma_builtin_get (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE);\n-#endif /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN */\n+      ecma_completion_value_t array_construction = ecma_op_create_array_object (NULL, 0, false);\n+      JERRY_ASSERT (ecma_is_completion_value_normal (array_construction));\n \n-      ecma_object_t *array_p = ecma_create_object (array_prototype_p, true, ECMA_OBJECT_TYPE_ARRAY);\n-      ecma_deref_object (array_prototype_p);\n-\n-      ecma_property_t *class_prop_p = ecma_create_internal_property (array_p, ECMA_INTERNAL_PROPERTY_CLASS);\n-      class_prop_p->u.internal_property.value = LIT_MAGIC_STRING_ARRAY_UL;\n+      ecma_object_t *array_p = ecma_get_object_from_value (ecma_get_completion_value_value (array_construction));\n \n       while (true)\n       {\n         if (ecma_builtin_json_check_right_square_token (token_p))\n         {\n-          ecma_string_t *length_magic_string_p = ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH);\n-          ecma_number_t *length_num_p = ecma_alloc_number ();\n-          *length_num_p = ecma_uint32_to_number (length);\n-\n-          ecma_property_t *length_prop_p = ecma_create_named_data_property (array_p,\n-                                                                            length_magic_string_p,\n-                                                                            true,\n-                                                                            false,\n-                                                                            false);\n-          ecma_set_named_data_property_value (length_prop_p, ecma_make_number_value (length_num_p));\n-          ecma_deref_ecma_string (length_magic_string_p);\n-","path":"jerry-core/ecma/builtin-objects/ecma-builtin-json.cpp","position":42,"original_position":42,"commit_id":"58360d961dae3f04e0b0501e2dd900046605b4c0","original_commit_id":"58360d961dae3f04e0b0501e2dd900046605b4c0","user":{"login":"ruben-ayrapetyan","id":11939769,"avatar_url":"https://avatars.githubusercontent.com/u/11939769?v=3","gravatar_id":"","url":"https://api.github.com/users/ruben-ayrapetyan","html_url":"https://github.com/ruben-ayrapetyan","followers_url":"https://api.github.com/users/ruben-ayrapetyan/followers","following_url":"https://api.github.com/users/ruben-ayrapetyan/following{/other_user}","gists_url":"https://api.github.com/users/ruben-ayrapetyan/gists{/gist_id}","starred_url":"https://api.github.com/users/ruben-ayrapetyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruben-ayrapetyan/subscriptions","organizations_url":"https://api.github.com/users/ruben-ayrapetyan/orgs","repos_url":"https://api.github.com/users/ruben-ayrapetyan/repos","events_url":"https://api.github.com/users/ruben-ayrapetyan/events{/privacy}","received_events_url":"https://api.github.com/users/ruben-ayrapetyan/received_events","type":"User","site_admin":false},"body":"If I understand correctly, ArrayLiteral in JSON should be parsed exactly as ArrayLiteral in source code (11.1.4, Array Initialiser). So, I've just moved implementation nearer to specification-defined algorithm that uses `[[DefineOwnProperty]]`.","created_at":"2015-08-14T09:27:17Z","updated_at":"2015-08-14T09:27:17Z","html_url":"https://github.com/Samsung/jerryscript/pull/571#discussion_r37061666","pull_request_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/571","_links":{"self":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments/37061666"},"html":{"href":"https://github.com/Samsung/jerryscript/pull/571#discussion_r37061666"},"pull_request":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/571"}}},"pull_request":{"url":"https://api.github.com/repos/Samsung/jerryscript/pulls/571","id":42391528,"html_url":"https://github.com/Samsung/jerryscript/pull/571","diff_url":"https://github.com/Samsung/jerryscript/pull/571.diff","patch_url":"https://github.com/Samsung/jerryscript/pull/571.patch","issue_url":"https://api.github.com/repos/Samsung/jerryscript/issues/571","number":571,"state":"open","locked":false,"title":"Replace ecma_create_object with high-level Object and Array construction interfaces in JSON built-in implementation","user":{"login":"ruben-ayrapetyan","id":11939769,"avatar_url":"https://avatars.githubusercontent.com/u/11939769?v=3","gravatar_id":"","url":"https://api.github.com/users/ruben-ayrapetyan","html_url":"https://github.com/ruben-ayrapetyan","followers_url":"https://api.github.com/users/ruben-ayrapetyan/followers","following_url":"https://api.github.com/users/ruben-ayrapetyan/following{/other_user}","gists_url":"https://api.github.com/users/ruben-ayrapetyan/gists{/gist_id}","starred_url":"https://api.github.com/users/ruben-ayrapetyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruben-ayrapetyan/subscriptions","organizations_url":"https://api.github.com/users/ruben-ayrapetyan/orgs","repos_url":"https://api.github.com/users/ruben-ayrapetyan/repos","events_url":"https://api.github.com/users/ruben-ayrapetyan/events{/privacy}","received_events_url":"https://api.github.com/users/ruben-ayrapetyan/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-13T19:52:58Z","updated_at":"2015-08-14T09:27:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39934155be9f2e0ed2b7526a2bad484f6ebd54fe","assignee":{"login":"zherczeg","id":2270193,"avatar_url":"https://avatars.githubusercontent.com/u/2270193?v=3","gravatar_id":"","url":"https://api.github.com/users/zherczeg","html_url":"https://github.com/zherczeg","followers_url":"https://api.github.com/users/zherczeg/followers","following_url":"https://api.github.com/users/zherczeg/following{/other_user}","gists_url":"https://api.github.com/users/zherczeg/gists{/gist_id}","starred_url":"https://api.github.com/users/zherczeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zherczeg/subscriptions","organizations_url":"https://api.github.com/users/zherczeg/orgs","repos_url":"https://api.github.com/users/zherczeg/repos","events_url":"https://api.github.com/users/zherczeg/events{/privacy}","received_events_url":"https://api.github.com/users/zherczeg/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Samsung/jerryscript/milestones/3","html_url":"https://github.com/Samsung/jerryscript/milestones/Maintenance%20of%20ECMA%20functionality","labels_url":"https://api.github.com/repos/Samsung/jerryscript/milestones/3/labels","id":1188988,"number":3,"title":"Maintenance of ECMA functionality","description":"","creator":{"login":"egavrin","id":782710,"avatar_url":"https://avatars.githubusercontent.com/u/782710?v=3","gravatar_id":"","url":"https://api.github.com/users/egavrin","html_url":"https://github.com/egavrin","followers_url":"https://api.github.com/users/egavrin/followers","following_url":"https://api.github.com/users/egavrin/following{/other_user}","gists_url":"https://api.github.com/users/egavrin/gists{/gist_id}","starred_url":"https://api.github.com/users/egavrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egavrin/subscriptions","organizations_url":"https://api.github.com/users/egavrin/orgs","repos_url":"https://api.github.com/users/egavrin/repos","events_url":"https://api.github.com/users/egavrin/events{/privacy}","received_events_url":"https://api.github.com/users/egavrin/received_events","type":"User","site_admin":false},"open_issues":34,"closed_issues":46,"state":"open","created_at":"2015-07-01T13:20:58Z","updated_at":"2015-08-13T19:52:58Z","due_on":"2015-08-27T21:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/571/commits","review_comments_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/571/comments","review_comment_url":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Samsung/jerryscript/issues/571/comments","statuses_url":"https://api.github.com/repos/Samsung/jerryscript/statuses/58360d961dae3f04e0b0501e2dd900046605b4c0","head":{"label":"Samsung:Ruben-replace-create-object-in-json","ref":"Ruben-replace-create-object-in-json","sha":"58360d961dae3f04e0b0501e2dd900046605b4c0","user":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"repo":{"id":33339660,"name":"jerryscript","full_name":"Samsung/jerryscript","owner":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Samsung/jerryscript","description":"","fork":false,"url":"https://api.github.com/repos/Samsung/jerryscript","forks_url":"https://api.github.com/repos/Samsung/jerryscript/forks","keys_url":"https://api.github.com/repos/Samsung/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Samsung/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Samsung/jerryscript/teams","hooks_url":"https://api.github.com/repos/Samsung/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/Samsung/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/Samsung/jerryscript/events","assignees_url":"https://api.github.com/repos/Samsung/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/Samsung/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/Samsung/jerryscript/tags","blobs_url":"https://api.github.com/repos/Samsung/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Samsung/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Samsung/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/Samsung/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Samsung/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/Samsung/jerryscript/languages","stargazers_url":"https://api.github.com/repos/Samsung/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/Samsung/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/Samsung/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/Samsung/jerryscript/subscription","commits_url":"https://api.github.com/repos/Samsung/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/Samsung/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/Samsung/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/Samsung/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/Samsung/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/Samsung/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Samsung/jerryscript/merges","archive_url":"https://api.github.com/repos/Samsung/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Samsung/jerryscript/downloads","issues_url":"https://api.github.com/repos/Samsung/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/Samsung/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/Samsung/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/Samsung/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Samsung/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/Samsung/jerryscript/releases{/id}","created_at":"2015-04-03T01:10:31Z","updated_at":"2015-08-14T09:03:47Z","pushed_at":"2015-08-14T09:00:24Z","git_url":"git://github.com/Samsung/jerryscript.git","ssh_url":"git@github.com:Samsung/jerryscript.git","clone_url":"https://github.com/Samsung/jerryscript.git","svn_url":"https://github.com/Samsung/jerryscript","homepage":null,"size":12484,"stargazers_count":854,"watchers_count":854,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":56,"mirror_url":null,"open_issues_count":90,"forks":56,"open_issues":90,"watchers":854,"default_branch":"master"}},"base":{"label":"Samsung:master","ref":"master","sha":"8f594aebfad8860cfd25a9d9d875233122081bd3","user":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"repo":{"id":33339660,"name":"jerryscript","full_name":"Samsung/jerryscript","owner":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars.githubusercontent.com/u/6210390?v=3","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Samsung/jerryscript","description":"","fork":false,"url":"https://api.github.com/repos/Samsung/jerryscript","forks_url":"https://api.github.com/repos/Samsung/jerryscript/forks","keys_url":"https://api.github.com/repos/Samsung/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Samsung/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Samsung/jerryscript/teams","hooks_url":"https://api.github.com/repos/Samsung/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/Samsung/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/Samsung/jerryscript/events","assignees_url":"https://api.github.com/repos/Samsung/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/Samsung/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/Samsung/jerryscript/tags","blobs_url":"https://api.github.com/repos/Samsung/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Samsung/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Samsung/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/Samsung/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Samsung/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/Samsung/jerryscript/languages","stargazers_url":"https://api.github.com/repos/Samsung/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/Samsung/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/Samsung/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/Samsung/jerryscript/subscription","commits_url":"https://api.github.com/repos/Samsung/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/Samsung/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/Samsung/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/Samsung/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/Samsung/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/Samsung/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Samsung/jerryscript/merges","archive_url":"https://api.github.com/repos/Samsung/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Samsung/jerryscript/downloads","issues_url":"https://api.github.com/repos/Samsung/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/Samsung/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/Samsung/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/Samsung/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Samsung/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/Samsung/jerryscript/releases{/id}","created_at":"2015-04-03T01:10:31Z","updated_at":"2015-08-14T09:03:47Z","pushed_at":"2015-08-14T09:00:24Z","git_url":"git://github.com/Samsung/jerryscript.git","ssh_url":"git@github.com:Samsung/jerryscript.git","clone_url":"https://github.com/Samsung/jerryscript.git","svn_url":"https://github.com/Samsung/jerryscript","homepage":null,"size":12484,"stargazers_count":854,"watchers_count":854,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":56,"mirror_url":null,"open_issues_count":90,"forks":56,"open_issues":90,"watchers":854,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/571"},"html":{"href":"https://github.com/Samsung/jerryscript/pull/571"},"issue":{"href":"https://api.github.com/repos/Samsung/jerryscript/issues/571"},"comments":{"href":"https://api.github.com/repos/Samsung/jerryscript/issues/571/comments"},"review_comments":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/571/comments"},"review_comment":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Samsung/jerryscript/pulls/571/commits"},"statuses":{"href":"https://api.github.com/repos/Samsung/jerryscript/statuses/58360d961dae3f04e0b0501e2dd900046605b4c0"}}}}