{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/74685760","id":74685760,"diff_hunk":"@@ -0,0 +1,52 @@\n+/*\n+ This source file is part of the Swift.org open source project\n+\n+ Copyright 2015 - 2016 Apple Inc. and the Swift project authors\n+ Licensed under Apache License v2.0 with Runtime Library Exception\n+\n+ See http://swift.org/LICENSE.txt for license information\n+ See http://swift.org/CONTRIBUTORS.txt for Swift project authors\n+*/\n+\n+/// A very minimal JSON type to serialize the manifest.\n+// FIXME: A more complete JSON type is already present in Basic but\n+// it needs to discussed if and how PackageDescription should handle\n+// dependencies.\n+enum JSON {\n+    case null\n+    case int(Int)\n+    case double(Double)\n+    case bool(Bool)\n+    case string(String)\n+    case array([JSON])\n+    case dictionary([String: JSON])\n+}\n+\n+extension JSON {\n+    /// Converts the JSON to string representation.\n+    // FIXME: No escaping implemented for now.\n+    func toString() -> String {\n+        switch self {\n+        case .null:\n+            return \"null\"\n+        case .bool(let value):\n+            return value ? \"true\" : \"false\"\n+        case .int(let value):\n+            return value.description\n+        case .double(let value):\n+            return value.debugDescription\n+        case .string(let value):\n+            return \"\\\"\" + value + \"\\\"\"","path":"Sources/PackageDescription/JSON.swift","position":39,"original_position":39,"commit_id":"36ea1c997178206172ff5df8ff1782a68703baff","original_commit_id":"36ea1c997178206172ff5df8ff1782a68703baff","user":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"body":"I agree however the TOML wasn't escaping strings either so this should have zero net effect from current code (unless I am missing something)","created_at":"2016-08-13T11:27:55Z","updated_at":"2016-08-13T11:27:55Z","html_url":"https://github.com/apple/swift-package-manager/pull/604#discussion_r74685760","pull_request_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/604","_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/74685760"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/604#discussion_r74685760"},"pull_request":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/604"}}},"pull_request":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/604","id":81210863,"html_url":"https://github.com/apple/swift-package-manager/pull/604","diff_url":"https://github.com/apple/swift-package-manager/pull/604.diff","patch_url":"https://github.com/apple/swift-package-manager/pull/604.patch","issue_url":"https://api.github.com/repos/apple/swift-package-manager/issues/604","number":604,"state":"open","locked":false,"title":"Refactor json serialization","user":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"body":"Depends on #603\r\n\r\nThis will move swift-package's dump-package to reuse PackageDescription JSON. However `package.targets` key in JSON will just be `targets`\r\n\r\n/cc @czechboy0 ","created_at":"2016-08-13T08:36:15Z","updated_at":"2016-08-13T11:27:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de81971d53e88f4884748764d3e0612887ecaac7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/604/commits","review_comments_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/604/comments","review_comment_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/issues/604/comments","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/36ea1c997178206172ff5df8ff1782a68703baff","head":{"label":"aciidb0mb3r:refactor-json-serialization","ref":"refactor-json-serialization","sha":"36ea1c997178206172ff5df8ff1782a68703baff","user":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"repo":{"id":47417816,"name":"swift-package-manager","full_name":"aciidb0mb3r/swift-package-manager","owner":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aciidb0mb3r/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":true,"url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager","forks_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/forks","keys_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/events","assignees_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/merges","archive_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/aciidb0mb3r/swift-package-manager/deployments","created_at":"2015-12-04T17:05:51Z","updated_at":"2016-02-04T13:02:44Z","pushed_at":"2016-08-13T08:34:38Z","git_url":"git://github.com/aciidb0mb3r/swift-package-manager.git","ssh_url":"git@github.com:aciidb0mb3r/swift-package-manager.git","clone_url":"https://github.com/aciidb0mb3r/swift-package-manager.git","svn_url":"https://github.com/aciidb0mb3r/swift-package-manager","homepage":"","size":2961,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apple:master","ref":"master","sha":"7605c6e622b39fffb72ddb97b8c38ffaef22dd9c","user":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44840041,"name":"swift-package-manager","full_name":"apple/swift-package-manager","owner":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift-package-manager","forks_url":"https://api.github.com/repos/apple/swift-package-manager/forks","keys_url":"https://api.github.com/repos/apple/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/apple/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/apple/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift-package-manager/events","assignees_url":"https://api.github.com/repos/apple/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/apple/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/apple/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/apple/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/apple/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/apple/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/apple/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift-package-manager/merges","archive_url":"https://api.github.com/repos/apple/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/apple/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift-package-manager/deployments","created_at":"2015-10-23T21:41:12Z","updated_at":"2016-08-13T09:13:20Z","pushed_at":"2016-08-13T08:36:15Z","git_url":"git://github.com/apple/swift-package-manager.git","ssh_url":"git@github.com:apple/swift-package-manager.git","clone_url":"https://github.com/apple/swift-package-manager.git","svn_url":"https://github.com/apple/swift-package-manager","homepage":"","size":3850,"stargazers_count":4483,"watchers_count":4483,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":406,"mirror_url":null,"open_issues_count":11,"forks":406,"open_issues":11,"watchers":4483,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/604"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/604"},"issue":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/604"},"comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/604/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/604/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/604/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift-package-manager/statuses/36ea1c997178206172ff5df8ff1782a68703baff"}}}}
{"actor":{"display_login":"aciidb0mb3r"}}