{"action":"created","comment":{"url":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/comments/76959919","id":76959919,"diff_hunk":"@@ -0,0 +1,68 @@\n+//\n+//  Created by Gavin on 03/06/2016.\n+//  Copyright © 2016 Bohemian Coding. All rights reserved.\n+//\n+\n+#import \"BCJSONEncoder.h\"\n+\n+NS_ASSUME_NONNULL_BEGIN\n+\n+/// The BCJSONDecoder class can be used to decode data in similar way to how\n+/// NSKeyedUnarchiver etc work.\n+@interface BCJSONDecoder : NSObject\n+\n+/// The \\c userInfo property can be used by a consumer of this class to attach\n+/// information pertinent to this current decoding.\n+@property (nonatomic,weak,nullable) id userInfo;","path":"Source/BCJSONDecoder.h","position":16,"original_position":16,"commit_id":"92bd87d99ad868b71bdde53b9abb5b6bd6b99d63","original_commit_id":"92bd87d99ad868b71bdde53b9abb5b6bd6b99d63","user":{"login":"opsGavin","id":9450018,"avatar_url":"https://avatars.githubusercontent.com/u/9450018?v=3","gravatar_id":"","url":"https://api.github.com/users/opsGavin","html_url":"https://github.com/opsGavin","followers_url":"https://api.github.com/users/opsGavin/followers","following_url":"https://api.github.com/users/opsGavin/following{/other_user}","gists_url":"https://api.github.com/users/opsGavin/gists{/gist_id}","starred_url":"https://api.github.com/users/opsGavin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opsGavin/subscriptions","organizations_url":"https://api.github.com/users/opsGavin/orgs","repos_url":"https://api.github.com/users/opsGavin/repos","events_url":"https://api.github.com/users/opsGavin/events{/privacy}","received_events_url":"https://api.github.com/users/opsGavin/received_events","type":"User","site_admin":false},"body":"Generally the consumer is going to be around for the duration of the write and can ensure that the `userInfo` is available while the write is happening. In fact it's quite likely that the consumer itself would be the `userInfo`. Making it strong would mean that the consumer would have to explicitly set it to `nil` again to avoid circular references.","created_at":"2016-08-31T10:06:56Z","updated_at":"2016-08-31T10:06:57Z","html_url":"https://github.com/BohemianCoding/BCFoundation/pull/80#discussion_r76959919","pull_request_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/80","_links":{"self":{"href":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/comments/76959919"},"html":{"href":"https://github.com/BohemianCoding/BCFoundation/pull/80#discussion_r76959919"},"pull_request":{"href":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/80","id":83413172,"html_url":"https://github.com/BohemianCoding/BCFoundation/pull/80","diff_url":"https://github.com/BohemianCoding/BCFoundation/pull/80.diff","patch_url":"https://github.com/BohemianCoding/BCFoundation/pull/80.patch","issue_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues/80","number":80,"state":"open","locked":false,"title":"Code Review: Make Zipped JSON our official File Format (#8880)","user":{"login":"samdeane","id":206306,"avatar_url":"https://avatars.githubusercontent.com/u/206306?v=3","gravatar_id":"","url":"https://api.github.com/users/samdeane","html_url":"https://github.com/samdeane","followers_url":"https://api.github.com/users/samdeane/followers","following_url":"https://api.github.com/users/samdeane/following{/other_user}","gists_url":"https://api.github.com/users/samdeane/gists{/gist_id}","starred_url":"https://api.github.com/users/samdeane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdeane/subscriptions","organizations_url":"https://api.github.com/users/samdeane/orgs","repos_url":"https://api.github.com/users/samdeane/repos","events_url":"https://api.github.com/users/samdeane/events{/privacy}","received_events_url":"https://api.github.com/users/samdeane/received_events","type":"User","site_admin":false},"body":"Code review for Make Zipped JSON our official File Format (#8880):\n\n> In #8756 we wrote a proof-of-concept to test the various approaches. Zipped JSON was surprisingly small compared to what we have now, and it didn't increase in size that much. The benefit of being able to do/allow server-side file parsing makes this the preferred option. Let's build it! :-D\n> \n> This'll be for @opsGavin since he built the POC, but also pinging in @samdeane and @mikeabdullah since I know he shares a keen interest in all things zip.\n> \n> For now I think it makes sense to only use the Intermediate Value Tree (#9190) for unarchiving since we win nothing by using it for archiving too. Yet we'll make a pluggable NSCoding-like class so we can easily do it later if needed\n> \n> -\n> \n> Things to look out for:\n> \n> 1. We use `ZipKit` already so we should either use that or make sure we update existing code to deal with `minizip' (which the POC used). Either way, we should have 1 zip package\n> 2. Make sure QuickLook keeps working with new and old files\n> 3. Even though our file format might for the moment only be 1 json file, it's expected that we'll have other files in there at some point so if we start with a zipped directory from the start that might make sense\n> \n> -\n> \n> Possible steps to take:\n> \n> - [x] Replace our MSArchiver with a custom serialiser class so we can plug in a JSON serialiser later #9365\n> - [x] Replace our MSUnarchiver with a custom deserialiser so we can plug in a JSON deserialiser later #9402\n> - [x] Write the above serialiser #9401\n> - [x] Write a deserialiser than reads in a mutable value tree, can perform migrations on that and then pass that to the immutables in a custom MSUnarchiver-type subclass #9403\n> - [x] Wrap the new JSON in a zipped folder with images and a `metadata.json` and make Sketch archive and unarchive that besides keeping support for unarchiving the old SQL format\n> - [x] Adapt the QL plugin to check for this image and fall back to an SQL read for the old format\n> - [ ] Make sure we can do migrations and detect documents that are too new like we can now\n> - [ ] Make sure missing fonts etc are recognises like they used to be\n> - [ ] Embed a preview of the first page in the Zip for QL and other tools\n> - [ ] Make sure old versions of Sketch don't crash but display some kind of sensible error with encountering the new file\n> - [ ] Make sure we can do some test migrations easily\n\n\nConnect to BohemianCoding/Sketch#8880.","created_at":"2016-08-31T08:59:12Z","updated_at":"2016-08-31T10:06:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/80/commits","review_comments_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/80/comments","review_comment_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues/80/comments","statuses_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/statuses/92bd87d99ad868b71bdde53b9abb5b6bd6b99d63","head":{"label":"BohemianCoding:feature/8880","ref":"feature/8880","sha":"92bd87d99ad868b71bdde53b9abb5b6bd6b99d63","user":{"login":"BohemianCoding","id":4498264,"avatar_url":"https://avatars.githubusercontent.com/u/4498264?v=3","gravatar_id":"","url":"https://api.github.com/users/BohemianCoding","html_url":"https://github.com/BohemianCoding","followers_url":"https://api.github.com/users/BohemianCoding/followers","following_url":"https://api.github.com/users/BohemianCoding/following{/other_user}","gists_url":"https://api.github.com/users/BohemianCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/BohemianCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BohemianCoding/subscriptions","organizations_url":"https://api.github.com/users/BohemianCoding/orgs","repos_url":"https://api.github.com/users/BohemianCoding/repos","events_url":"https://api.github.com/users/BohemianCoding/events{/privacy}","received_events_url":"https://api.github.com/users/BohemianCoding/received_events","type":"Organization","site_admin":false},"repo":{"id":13962123,"name":"BCFoundation","full_name":"BohemianCoding/BCFoundation","owner":{"login":"BohemianCoding","id":4498264,"avatar_url":"https://avatars.githubusercontent.com/u/4498264?v=3","gravatar_id":"","url":"https://api.github.com/users/BohemianCoding","html_url":"https://github.com/BohemianCoding","followers_url":"https://api.github.com/users/BohemianCoding/followers","following_url":"https://api.github.com/users/BohemianCoding/following{/other_user}","gists_url":"https://api.github.com/users/BohemianCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/BohemianCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BohemianCoding/subscriptions","organizations_url":"https://api.github.com/users/BohemianCoding/orgs","repos_url":"https://api.github.com/users/BohemianCoding/repos","events_url":"https://api.github.com/users/BohemianCoding/events{/privacy}","received_events_url":"https://api.github.com/users/BohemianCoding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BohemianCoding/BCFoundation","description":"Shared prefixes, configurations etc for a number of other projects","fork":false,"url":"https://api.github.com/repos/BohemianCoding/BCFoundation","forks_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/forks","keys_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/teams","hooks_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/hooks","issue_events_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues/events{/number}","events_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/events","assignees_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/assignees{/user}","branches_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/branches{/branch}","tags_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/tags","blobs_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/refs{/sha}","trees_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/statuses/{sha}","languages_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/languages","stargazers_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/stargazers","contributors_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/contributors","subscribers_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/subscribers","subscription_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/subscription","commits_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/commits{/sha}","git_commits_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/commits{/sha}","comments_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/comments{/number}","issue_comment_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues/comments{/number}","contents_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/contents/{+path}","compare_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/merges","archive_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/downloads","issues_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues{/number}","pulls_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls{/number}","milestones_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/milestones{/number}","notifications_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/labels{/name}","releases_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/releases{/id}","deployments_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/deployments","created_at":"2013-10-29T16:48:27Z","updated_at":"2016-01-25T15:08:14Z","pushed_at":"2016-08-31T08:59:12Z","git_url":"git://github.com/BohemianCoding/BCFoundation.git","ssh_url":"git@github.com:BohemianCoding/BCFoundation.git","clone_url":"https://github.com/BohemianCoding/BCFoundation.git","svn_url":"https://github.com/BohemianCoding/BCFoundation","homepage":"","size":386,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"develop"}},"base":{"label":"BohemianCoding:develop","ref":"develop","sha":"cfddd5390f6d0b2bebf5a5b80f7cb53b29ca5757","user":{"login":"BohemianCoding","id":4498264,"avatar_url":"https://avatars.githubusercontent.com/u/4498264?v=3","gravatar_id":"","url":"https://api.github.com/users/BohemianCoding","html_url":"https://github.com/BohemianCoding","followers_url":"https://api.github.com/users/BohemianCoding/followers","following_url":"https://api.github.com/users/BohemianCoding/following{/other_user}","gists_url":"https://api.github.com/users/BohemianCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/BohemianCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BohemianCoding/subscriptions","organizations_url":"https://api.github.com/users/BohemianCoding/orgs","repos_url":"https://api.github.com/users/BohemianCoding/repos","events_url":"https://api.github.com/users/BohemianCoding/events{/privacy}","received_events_url":"https://api.github.com/users/BohemianCoding/received_events","type":"Organization","site_admin":false},"repo":{"id":13962123,"name":"BCFoundation","full_name":"BohemianCoding/BCFoundation","owner":{"login":"BohemianCoding","id":4498264,"avatar_url":"https://avatars.githubusercontent.com/u/4498264?v=3","gravatar_id":"","url":"https://api.github.com/users/BohemianCoding","html_url":"https://github.com/BohemianCoding","followers_url":"https://api.github.com/users/BohemianCoding/followers","following_url":"https://api.github.com/users/BohemianCoding/following{/other_user}","gists_url":"https://api.github.com/users/BohemianCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/BohemianCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BohemianCoding/subscriptions","organizations_url":"https://api.github.com/users/BohemianCoding/orgs","repos_url":"https://api.github.com/users/BohemianCoding/repos","events_url":"https://api.github.com/users/BohemianCoding/events{/privacy}","received_events_url":"https://api.github.com/users/BohemianCoding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BohemianCoding/BCFoundation","description":"Shared prefixes, configurations etc for a number of other projects","fork":false,"url":"https://api.github.com/repos/BohemianCoding/BCFoundation","forks_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/forks","keys_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/teams","hooks_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/hooks","issue_events_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues/events{/number}","events_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/events","assignees_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/assignees{/user}","branches_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/branches{/branch}","tags_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/tags","blobs_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/refs{/sha}","trees_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/statuses/{sha}","languages_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/languages","stargazers_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/stargazers","contributors_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/contributors","subscribers_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/subscribers","subscription_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/subscription","commits_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/commits{/sha}","git_commits_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/git/commits{/sha}","comments_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/comments{/number}","issue_comment_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues/comments{/number}","contents_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/contents/{+path}","compare_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/merges","archive_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/downloads","issues_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues{/number}","pulls_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls{/number}","milestones_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/milestones{/number}","notifications_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/labels{/name}","releases_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/releases{/id}","deployments_url":"https://api.github.com/repos/BohemianCoding/BCFoundation/deployments","created_at":"2013-10-29T16:48:27Z","updated_at":"2016-01-25T15:08:14Z","pushed_at":"2016-08-31T08:59:12Z","git_url":"git://github.com/BohemianCoding/BCFoundation.git","ssh_url":"git@github.com:BohemianCoding/BCFoundation.git","clone_url":"https://github.com/BohemianCoding/BCFoundation.git","svn_url":"https://github.com/BohemianCoding/BCFoundation","homepage":"","size":386,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/80"},"html":{"href":"https://github.com/BohemianCoding/BCFoundation/pull/80"},"issue":{"href":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues/80"},"comments":{"href":"https://api.github.com/repos/BohemianCoding/BCFoundation/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BohemianCoding/BCFoundation/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/BohemianCoding/BCFoundation/statuses/92bd87d99ad868b71bdde53b9abb5b6bd6b99d63"}}}}
{"actor":{"display_login":"opsGavin"}}