{"action":"created","comment":{"url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/comments/34692053","id":34692053,"diff_hunk":"@@ -0,0 +1,139 @@\n++++\n+date = \"2015-03-19T14:27:51-04:00\"\n+title = \"Documents\"\n+[menu.main]\n+  parent = \"BSON\"\n+  weight = 20\n+  pre = \"<i class='fa'></i>\"\n++++\n+\n+## Documents\n+\n+The scala driver includes two scala specific representations for BSON documents. Following convention from the scala collections library,\n+there are immutable and mutable implementations of documents. The underlying implementations of the scala Document use the type safe \n+[`BsonDocument`]({{< coreapiref \"org/bson/BsonDocument\" >}}) class. The scala bson classes are available from the `org.mongodb.scala.bson` \n+namespace, which includes type aliases and companion objects.  In general this should suffice but for advanced use cases you may need to \n+use `org.bson` directly.\n+\n+{{% note %}}\n+The scala `Document` classes implement `TraversableLike[(String, BsonValue)]` and the general API mirrors that of a `Map[String, BsonValue]`.\n+However, unlike `Map` implementations of `TraversableLike` enables strict type safety as their is no variance in the value type.\n+{{% /note %}}\n+\n+[`BsonValue`]({{< apiref \"org.mongodb.scala.bson.BsonValue\" >}}) is the type safe representation of a Bson type from the `org.bson` library, \n+it represents specific value types, the most commonly used value types are: \n+   \n+| BSON type | Scala type                        |\n+|-----------|-----------------------------------|\n+| Document  | `org.mongodb.scala.bson.Document` |\n+| Array     | `List`                            |\n+| Date      | `Date` or `int` (ms since epoch)  |\n+| Boolean   | `Boolean`                         |\n+| Double    | `Double`                          |\n+| Int32     | `Integer`                         |\n+| Int64     | `Long`                            |\n+| String    | `String`                          |\n+| Binary    | `Array[Byte]`                     |\n+| ObjectId  | `ObjectId`                        |\n+| Null      | `None`                            |\n+\n+It is actually possible to change or extend these mappings this will be covered in detail below.","path":"docs/reference/content/bson/documents.md","position":40,"original_position":40,"commit_id":"0f61736996d144cc1ba0c14992c91fc3a1f681aa","original_commit_id":"0f61736996d144cc1ba0c14992c91fc3a1f681aa","user":{"login":"jyemin","id":1111546,"avatar_url":"https://avatars.githubusercontent.com/u/1111546?v=3","gravatar_id":"","url":"https://api.github.com/users/jyemin","html_url":"https://github.com/jyemin","followers_url":"https://api.github.com/users/jyemin/followers","following_url":"https://api.github.com/users/jyemin/following{/other_user}","gists_url":"https://api.github.com/users/jyemin/gists{/gist_id}","starred_url":"https://api.github.com/users/jyemin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyemin/subscriptions","organizations_url":"https://api.github.com/users/jyemin/orgs","repos_url":"https://api.github.com/users/jyemin/repos","events_url":"https://api.github.com/users/jyemin/events{/privacy}","received_events_url":"https://api.github.com/users/jyemin/received_events","type":"User","site_admin":false},"body":"Run-on sentence","created_at":"2015-07-15T15:38:57Z","updated_at":"2015-07-15T15:38:57Z","html_url":"https://github.com/rozza/mongo-scala-driver/pull/9#discussion_r34692053","pull_request_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/comments/34692053"},"html":{"href":"https://github.com/rozza/mongo-scala-driver/pull/9#discussion_r34692053"},"pull_request":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/9","id":40007487,"html_url":"https://github.com/rozza/mongo-scala-driver/pull/9","diff_url":"https://github.com/rozza/mongo-scala-driver/pull/9.diff","patch_url":"https://github.com/rozza/mongo-scala-driver/pull/9.patch","issue_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/9","number":9,"state":"open","locked":false,"title":"Docs: Added bson section","user":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"body":"Updated scaladoc\r\nSCALA-197\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/rozza/mongo-scala-driver/9)\n<!-- Reviewable:end -->\n","created_at":"2015-07-15T10:19:44Z","updated_at":"2015-07-15T15:38:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cedbb29d4c73b14e473663a90d52c8976d4f73a","assignee":{"login":"jyemin","id":1111546,"avatar_url":"https://avatars.githubusercontent.com/u/1111546?v=3","gravatar_id":"","url":"https://api.github.com/users/jyemin","html_url":"https://github.com/jyemin","followers_url":"https://api.github.com/users/jyemin/followers","following_url":"https://api.github.com/users/jyemin/following{/other_user}","gists_url":"https://api.github.com/users/jyemin/gists{/gist_id}","starred_url":"https://api.github.com/users/jyemin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyemin/subscriptions","organizations_url":"https://api.github.com/users/jyemin/orgs","repos_url":"https://api.github.com/users/jyemin/repos","events_url":"https://api.github.com/users/jyemin/events{/privacy}","received_events_url":"https://api.github.com/users/jyemin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/9/commits","review_comments_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/9/comments","review_comment_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/9/comments","statuses_url":"https://api.github.com/repos/rozza/mongo-scala-driver/statuses/0f61736996d144cc1ba0c14992c91fc3a1f681aa","head":{"label":"rozza:s197","ref":"s197","sha":"0f61736996d144cc1ba0c14992c91fc3a1f681aa","user":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"repo":{"id":17707682,"name":"mongo-scala-driver","full_name":"rozza/mongo-scala-driver","owner":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rozza/mongo-scala-driver","description":"","fork":true,"url":"https://api.github.com/repos/rozza/mongo-scala-driver","forks_url":"https://api.github.com/repos/rozza/mongo-scala-driver/forks","keys_url":"https://api.github.com/repos/rozza/mongo-scala-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rozza/mongo-scala-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rozza/mongo-scala-driver/teams","hooks_url":"https://api.github.com/repos/rozza/mongo-scala-driver/hooks","issue_events_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/events{/number}","events_url":"https://api.github.com/repos/rozza/mongo-scala-driver/events","assignees_url":"https://api.github.com/repos/rozza/mongo-scala-driver/assignees{/user}","branches_url":"https://api.github.com/repos/rozza/mongo-scala-driver/branches{/branch}","tags_url":"https://api.github.com/repos/rozza/mongo-scala-driver/tags","blobs_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rozza/mongo-scala-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/rozza/mongo-scala-driver/languages","stargazers_url":"https://api.github.com/repos/rozza/mongo-scala-driver/stargazers","contributors_url":"https://api.github.com/repos/rozza/mongo-scala-driver/contributors","subscribers_url":"https://api.github.com/repos/rozza/mongo-scala-driver/subscribers","subscription_url":"https://api.github.com/repos/rozza/mongo-scala-driver/subscription","commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/rozza/mongo-scala-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/rozza/mongo-scala-driver/contents/{+path}","compare_url":"https://api.github.com/repos/rozza/mongo-scala-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rozza/mongo-scala-driver/merges","archive_url":"https://api.github.com/repos/rozza/mongo-scala-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rozza/mongo-scala-driver/downloads","issues_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues{/number}","pulls_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/rozza/mongo-scala-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/rozza/mongo-scala-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rozza/mongo-scala-driver/labels{/name}","releases_url":"https://api.github.com/repos/rozza/mongo-scala-driver/releases{/id}","created_at":"2014-03-13T11:24:55Z","updated_at":"2015-04-07T13:41:44Z","pushed_at":"2015-07-15T10:23:09Z","git_url":"git://github.com/rozza/mongo-scala-driver.git","ssh_url":"git@github.com:rozza/mongo-scala-driver.git","clone_url":"https://github.com/rozza/mongo-scala-driver.git","svn_url":"https://github.com/rozza/mongo-scala-driver","homepage":null,"size":2675,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"rozza:master","ref":"master","sha":"71b1fd721a4e886081854dafe168c7b6d94c69f1","user":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"repo":{"id":17707682,"name":"mongo-scala-driver","full_name":"rozza/mongo-scala-driver","owner":{"login":"rozza","id":420,"avatar_url":"https://avatars.githubusercontent.com/u/420?v=3","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rozza/mongo-scala-driver","description":"","fork":true,"url":"https://api.github.com/repos/rozza/mongo-scala-driver","forks_url":"https://api.github.com/repos/rozza/mongo-scala-driver/forks","keys_url":"https://api.github.com/repos/rozza/mongo-scala-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rozza/mongo-scala-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rozza/mongo-scala-driver/teams","hooks_url":"https://api.github.com/repos/rozza/mongo-scala-driver/hooks","issue_events_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/events{/number}","events_url":"https://api.github.com/repos/rozza/mongo-scala-driver/events","assignees_url":"https://api.github.com/repos/rozza/mongo-scala-driver/assignees{/user}","branches_url":"https://api.github.com/repos/rozza/mongo-scala-driver/branches{/branch}","tags_url":"https://api.github.com/repos/rozza/mongo-scala-driver/tags","blobs_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rozza/mongo-scala-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/rozza/mongo-scala-driver/languages","stargazers_url":"https://api.github.com/repos/rozza/mongo-scala-driver/stargazers","contributors_url":"https://api.github.com/repos/rozza/mongo-scala-driver/contributors","subscribers_url":"https://api.github.com/repos/rozza/mongo-scala-driver/subscribers","subscription_url":"https://api.github.com/repos/rozza/mongo-scala-driver/subscription","commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/rozza/mongo-scala-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/rozza/mongo-scala-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/rozza/mongo-scala-driver/contents/{+path}","compare_url":"https://api.github.com/repos/rozza/mongo-scala-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rozza/mongo-scala-driver/merges","archive_url":"https://api.github.com/repos/rozza/mongo-scala-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rozza/mongo-scala-driver/downloads","issues_url":"https://api.github.com/repos/rozza/mongo-scala-driver/issues{/number}","pulls_url":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/rozza/mongo-scala-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/rozza/mongo-scala-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rozza/mongo-scala-driver/labels{/name}","releases_url":"https://api.github.com/repos/rozza/mongo-scala-driver/releases{/id}","created_at":"2014-03-13T11:24:55Z","updated_at":"2015-04-07T13:41:44Z","pushed_at":"2015-07-15T10:23:09Z","git_url":"git://github.com/rozza/mongo-scala-driver.git","ssh_url":"git@github.com:rozza/mongo-scala-driver.git","clone_url":"https://github.com/rozza/mongo-scala-driver.git","svn_url":"https://github.com/rozza/mongo-scala-driver","homepage":null,"size":2675,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/9"},"html":{"href":"https://github.com/rozza/mongo-scala-driver/pull/9"},"issue":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/9"},"comments":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/rozza/mongo-scala-driver/statuses/0f61736996d144cc1ba0c14992c91fc3a1f681aa"}}}}