{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/comments/190319349","pull_request_review_id":122650375,"id":190319349,"diff_hunk":"@@ -0,0 +1,647 @@\n+import Foundation\n+import libmongoc\n+\n+/// `BSONEncoder` facilitates the encoding of `Encodable` values into BSON.\n+public class BSONEncoder {\n+\n+    /// Contextual user-provided information for use during encoding.\n+    public var userInfo: [CodingUserInfoKey: Any] = [:]\n+\n+    /// Options set on the top-level encoder to pass down the encoding hierarchy.\n+    fileprivate struct _Options {\n+        let userInfo: [CodingUserInfoKey: Any]\n+    }\n+\n+    /// The options set on the top-level encoder.\n+    fileprivate var options: _Options {\n+        return _Options(userInfo: userInfo)\n+    }\n+\n+    /// Initializes `self`.\n+    public init() {}\n+\n+    /// Encodes the given top-level value and returns its BSON representation.\n+    ///\n+    /// - parameter value: The value to encode.\n+    /// - returns: A new `Document` containing the encoded BSON data.\n+    /// - throws: An error if any value throws an error during encoding.\n+    public func encode<T: Encodable>(_ value: T) throws -> Document {\n+        let encoder = _BSONEncoder(options: self.options)\n+        guard let topLevel = try encoder.box(value) else {\n+            throw EncodingError.invalidValue(value,\n+                EncodingError.Context(codingPath: [],\n+                    debugDescription: \"Top-level \\(T.self) did not encode any values.\"))\n+        }\n+\n+        guard let dict = topLevel as? MutableDictionary else {\n+            throw EncodingError.invalidValue(value,\n+                EncodingError.Context(codingPath: [],\n+                    debugDescription: \"Top-level \\(T.self) was not encoded as a complete document.\"))\n+        }\n+\n+        return dict.asDocument()\n+    }\n+}\n+\n+/// A private class to implement the `Encoder` protocol.\n+private class _BSONEncoder: Encoder {\n+\n+    /// The encoder's storage.\n+    fileprivate var storage: _BSONEncodingStorage\n+\n+    /// Options set on the top-level encoder.\n+    fileprivate let options: BSONEncoder._Options\n+\n+    /// The path to the current point in encoding.\n+    public var codingPath: [CodingKey]\n+\n+    /// Contextual user-provided information for use during encoding.\n+    public var userInfo: [CodingUserInfoKey: Any] {\n+        return self.options.userInfo\n+    }\n+\n+    /// Initializes `self` with the given top-level encoder options.\n+    fileprivate init(options: BSONEncoder._Options, codingPath: [CodingKey] = []) {\n+        self.options = options\n+        self.storage = _BSONEncodingStorage()\n+        self.codingPath = codingPath\n+    }\n+\n+    /// Returns whether a new element can be encoded at this coding path.\n+    ///\n+    /// `true` if an element has not yet been encoded at this coding path; `false` otherwise.\n+    fileprivate var canEncodeNewValue: Bool {\n+        return self.storage.count == self.codingPath.count\n+    }\n+\n+    public func container<Key>(keyedBy: Key.Type) -> KeyedEncodingContainer<Key> {\n+        // If an existing keyed container was already requested, return that one.\n+        let topContainer: MutableDictionary\n+        if self.canEncodeNewValue {\n+            // We haven't yet pushed a container at this level; do so here.\n+            topContainer = self.storage.pushKeyedContainer()\n+        } else {\n+            guard let container = self.storage.containers.last as? MutableDictionary else {\n+                preconditionFailure(\n+                    \"Attempt to push new keyed encoding container when already previously encoded at this path.\")\n+            }\n+            topContainer = container\n+        }\n+        let container = _BSONKeyedEncodingContainer<Key>(\n+            referencing: self, codingPath: self.codingPath, wrapping: topContainer)\n+        return KeyedEncodingContainer(container)\n+    }\n+\n+    public func unkeyedContainer() -> UnkeyedEncodingContainer {\n+        // If an existing unkeyed container was already requested, return that one.\n+        let topContainer: MutableArray\n+        if self.canEncodeNewValue {\n+            // We haven't yet pushed a container at this level; do so here.\n+            topContainer = self.storage.pushUnkeyedContainer()\n+        } else {\n+            guard let container = self.storage.containers.last as? MutableArray else {\n+                preconditionFailure(\n+                    \"Attempt to push new unkeyed encoding container when already previously encoded at this path.\")\n+            }\n+            topContainer = container\n+        }\n+\n+        return _BSONUnkeyedEncodingContainer(referencing: self, codingPath: self.codingPath, wrapping: topContainer)\n+    }\n+\n+    public func singleValueContainer() -> SingleValueEncodingContainer {\n+        return self\n+    }\n+}\n+\n+private struct _BSONEncodingStorage {\n+\n+    /// The container stack.\n+    /// Elements may be any BsonValue type.\n+    fileprivate var containers: [BsonValue?] = []\n+\n+    /// Initializes `self` with no containers.\n+    fileprivate init() {}\n+\n+    fileprivate var count: Int {\n+        return self.containers.count\n+    }\n+\n+    fileprivate mutating func pushKeyedContainer() -> MutableDictionary {\n+        let dictionary = MutableDictionary()\n+        self.containers.append(dictionary)\n+        return dictionary\n+    }\n+\n+    fileprivate mutating func pushUnkeyedContainer() -> MutableArray {\n+        let array = MutableArray()\n+        self.containers.append(array)\n+        return array\n+    }\n+\n+    fileprivate mutating func push(container: BsonValue?) {\n+        self.containers.append(container)\n+    }\n+\n+    fileprivate mutating func popContainer() -> BsonValue? {\n+        precondition(self.containers.count > 0, \"Empty container stack.\")\n+        return self.containers.popLast()!\n+    }\n+}\n+\n+/// _BsonReferencingEncoder is a special subclass of _BsonEncoder which has its own storage, but references the \n+/// contents of a different encoder. It's used in superEncoder(), which returns a new encoder for encoding a \n+/// superclass -- the lifetime of the encoder should not escape the scope it's created in, but it doesn't \n+// necessarily know when it's done being used (to write to the original container).\n+private class _BsonReferencingEncoder: _BSONEncoder {\n+\n+    /// The type of container we're referencing.\n+    private enum Reference {\n+        /// Referencing a specific index in an array container.\n+        case array(MutableArray, Int)\n+\n+        /// Referencing a specific key in a dictionary container.\n+        case dictionary(MutableDictionary, String)\n+    }\n+\n+    /// The encoder we're referencing.\n+    fileprivate let encoder: _BSONEncoder\n+\n+    /// The container reference itself.\n+    private let reference: Reference\n+\n+    fileprivate init(referencing encoder: _BSONEncoder, at index: Int, wrapping array: MutableArray) {\n+        self.encoder = encoder\n+        self.reference = .array(array, index)\n+        super.init(options: encoder.options, codingPath: encoder.codingPath)\n+\n+        self.codingPath.append(_BsonKey(index: index))\n+    }\n+\n+    /// Initializes `self` by referencing the given dictionary container in the given encoder.\n+    fileprivate init(referencing encoder: _BSONEncoder, key: CodingKey, wrapping dictionary: MutableDictionary) {\n+        self.encoder = encoder\n+        self.reference = .dictionary(dictionary, key.stringValue)\n+        super.init(options: encoder.options, codingPath: encoder.codingPath)\n+\n+        self.codingPath.append(key)\n+    }\n+\n+    fileprivate override var canEncodeNewValue: Bool {\n+        // With a regular encoder, the storage and coding path grow together.\n+        // A referencing encoder, however, inherits its parents coding path, as well as the key it was created for.\n+        // We have to take this into account.\n+        return self.storage.count == self.codingPath.count - self.encoder.codingPath.count - 1\n+    }\n+\n+    /// Finalizes `self` by writing the contents of our storage to the referenced encoder's storage.\n+    deinit {\n+        let value: BsonValue?\n+        switch self.storage.count {\n+        case 0: value = nil\n+        case 1: value = self.storage.popContainer()\n+        default: fatalError(\"Referencing encoder deallocated with multiple containers on stack.\")\n+        }\n+\n+        switch self.reference {\n+        case .array(let array, let index):\n+            array.insert(value, at: index)\n+\n+        case .dictionary(let dictionary, let key):\n+            dictionary[key] = value\n+        }\n+    }\n+\n+}\n+\n+/// Extend _BSONEncoder to add methods for \"boxing\" values.\n+extension _BSONEncoder {\n+\n+    /// Converts a `CodableNumber` to a `BsonValue` type. Throws if `value` cannot be \n+    /// exactly represented by an `Int`, `Int32`, `Int64`, or `Double`. \n+    fileprivate func boxNumber<T: CodableNumber>(_ value: T) throws -> BsonValue {\n+        guard let number = value.bsonValue else {\n+            throw EncodingError._numberError(at: self.codingPath, value: value)\n+        }\n+        return number\n+    }\n+\n+    fileprivate func box<T: Encodable>(_ value: T) throws -> BsonValue? {\n+\n+        // if it's already a BsonValue, just return it, unless if it is an \n+        // array. technically [Any] is a BsonValue, but we can only use this\n+        // short-circuiting if all the elements are actually BsonValues.\n+        if let bsonValue = value as? BsonValue, !(bsonValue is [Any]) {\n+            return bsonValue\n+        } else if let bsonArray = value as? [BsonValue?] {","path":"Sources/MongoSwift/BSON/BsonEncoderNew.swift","position":236,"original_position":236,"commit_id":"9776edac951caf1a2e052beb17d5d7847a9090cf","original_commit_id":"d1c96b596bb946071d62c1dda1b74429460a159f","user":{"login":"kmahar","id":5976377,"avatar_url":"https://avatars0.githubusercontent.com/u/5976377?v=4","gravatar_id":"","url":"https://api.github.com/users/kmahar","html_url":"https://github.com/kmahar","followers_url":"https://api.github.com/users/kmahar/followers","following_url":"https://api.github.com/users/kmahar/following{/other_user}","gists_url":"https://api.github.com/users/kmahar/gists{/gist_id}","starred_url":"https://api.github.com/users/kmahar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmahar/subscriptions","organizations_url":"https://api.github.com/users/kmahar/orgs","repos_url":"https://api.github.com/users/kmahar/repos","events_url":"https://api.github.com/users/kmahar/events{/privacy}","received_events_url":"https://api.github.com/users/kmahar/received_events","type":"User","site_admin":false},"body":"this would come up in the case someone was encoding an array of optionals that had a nil in it. for example\r\n```swift\r\nstruct MyStruct: Encodable {\r\n    let ints: [Int?]\r\n}\r\n\r\nlet s = MyStruct(ints: [1, 2, nil])\r\n```","created_at":"2018-05-23T16:39:58Z","updated_at":"2018-05-23T16:57:49Z","html_url":"https://github.com/mongodb/mongo-swift-driver/pull/58#discussion_r190319349","pull_request_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/58","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/comments/190319349"},"html":{"href":"https://github.com/mongodb/mongo-swift-driver/pull/58#discussion_r190319349"},"pull_request":{"href":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/58"}},"in_reply_to_id":190236401},"pull_request":{"url":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/58","id":187910781,"html_url":"https://github.com/mongodb/mongo-swift-driver/pull/58","diff_url":"https://github.com/mongodb/mongo-swift-driver/pull/58.diff","patch_url":"https://github.com/mongodb/mongo-swift-driver/pull/58.patch","issue_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues/58","number":58,"state":"open","locked":false,"title":"SWIFT-77 Rewrite BsonEncoder to conform to Encoder protocol ","user":{"login":"kmahar","id":5976377,"avatar_url":"https://avatars0.githubusercontent.com/u/5976377?v=4","gravatar_id":"","url":"https://api.github.com/users/kmahar","html_url":"https://github.com/kmahar","followers_url":"https://api.github.com/users/kmahar/followers","following_url":"https://api.github.com/users/kmahar/following{/other_user}","gists_url":"https://api.github.com/users/kmahar/gists{/gist_id}","starred_url":"https://api.github.com/users/kmahar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmahar/subscriptions","organizations_url":"https://api.github.com/users/kmahar/orgs","repos_url":"https://api.github.com/users/kmahar/repos","events_url":"https://api.github.com/users/kmahar/events{/privacy}","received_events_url":"https://api.github.com/users/kmahar/received_events","type":"User","site_admin":false},"body":"This is all on top the `BsonDecoder` PR so hold off on reviewing til that's in.\r\n\r\nTo make the review process easier for switching to the new encoder, I've written this implementation in its own file and temporarily named it `BSONEncoder`(instead of `BsonEncoder`). The old encoder still exists and all of the options types are encoded with it. \r\nIn a second PR to follow this one, I will remove the old encoder and replace all usages of it with this new one, in the process making all of our options types `Encodable`. \r\n","created_at":"2018-05-14T18:22:28Z","updated_at":"2018-05-23T16:57:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7aeb41c7891d88f43ffc55ca8db7cba759d70eca","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/58/commits","review_comments_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/58/comments","review_comment_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues/58/comments","statuses_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/statuses/9776edac951caf1a2e052beb17d5d7847a9090cf","head":{"label":"mongodb:SWIFT-77","ref":"SWIFT-77","sha":"9776edac951caf1a2e052beb17d5d7847a9090cf","user":{"login":"mongodb","id":45120,"avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":118030974,"name":"mongo-swift-driver","full_name":"mongodb/mongo-swift-driver","owner":{"login":"mongodb","id":45120,"avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb/mongo-swift-driver","description":"The Swift driver for MongoDB","fork":false,"url":"https://api.github.com/repos/mongodb/mongo-swift-driver","forks_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/forks","keys_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/teams","hooks_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/hooks","issue_events_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/events","assignees_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/tags","blobs_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/languages","stargazers_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/stargazers","contributors_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/contributors","subscribers_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/subscribers","subscription_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/subscription","commits_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/merges","archive_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/downloads","issues_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/deployments","created_at":"2018-01-18T19:55:11Z","updated_at":"2018-05-23T10:34:41Z","pushed_at":"2018-05-23T16:57:46Z","git_url":"git://github.com/mongodb/mongo-swift-driver.git","ssh_url":"git@github.com:mongodb/mongo-swift-driver.git","clone_url":"https://github.com/mongodb/mongo-swift-driver.git","svn_url":"https://github.com/mongodb/mongo-swift-driver","homepage":"","size":3454,"stargazers_count":24,"watchers_count":24,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":2,"open_issues":5,"watchers":24,"default_branch":"master"}},"base":{"label":"mongodb:master","ref":"master","sha":"68e0ef8f9d2d8f832d3034cf3ddeae89d82eb26f","user":{"login":"mongodb","id":45120,"avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":118030974,"name":"mongo-swift-driver","full_name":"mongodb/mongo-swift-driver","owner":{"login":"mongodb","id":45120,"avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb/mongo-swift-driver","description":"The Swift driver for MongoDB","fork":false,"url":"https://api.github.com/repos/mongodb/mongo-swift-driver","forks_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/forks","keys_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/teams","hooks_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/hooks","issue_events_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/events","assignees_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/tags","blobs_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/languages","stargazers_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/stargazers","contributors_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/contributors","subscribers_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/subscribers","subscription_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/subscription","commits_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/merges","archive_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/downloads","issues_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb/mongo-swift-driver/deployments","created_at":"2018-01-18T19:55:11Z","updated_at":"2018-05-23T10:34:41Z","pushed_at":"2018-05-23T16:57:46Z","git_url":"git://github.com/mongodb/mongo-swift-driver.git","ssh_url":"git@github.com:mongodb/mongo-swift-driver.git","clone_url":"https://github.com/mongodb/mongo-swift-driver.git","svn_url":"https://github.com/mongodb/mongo-swift-driver","homepage":"","size":3454,"stargazers_count":24,"watchers_count":24,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":2,"open_issues":5,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/58"},"html":{"href":"https://github.com/mongodb/mongo-swift-driver/pull/58"},"issue":{"href":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues/58"},"comments":{"href":"https://api.github.com/repos/mongodb/mongo-swift-driver/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/mongo-swift-driver/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/mongo-swift-driver/statuses/9776edac951caf1a2e052beb17d5d7847a9090cf"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kmahar"}}