{"id":2132,"date":"2016-01-26T07:59:48","date_gmt":"2016-01-26T07:59:47","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2132"},"modified":"2019-05-18T06:43:04","modified_gmt":"2019-05-18T13:43:04","slug":"how-to-validate-documents-types-in-sync-gateway","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/","title":{"rendered":"How to Validate Documents Types in Sync Gateway"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"color: #333333; font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/january\/how-to-validate-documents-types-in-sync-gateway\/screen-shot-2016-01-19-at-3.00.04-am.png\" \/>In the previous blog of the Sync Gateway series, we explored <a href=\"https:\/\/www.couchbase.com\/blog\/how-to-authorize-users-in-sync-gateway\/\">how to Authenticate and Authorize users<\/a> in an application through some of the Sync Gateway features.\u00a0 Building from the series, we will now explore how to validate Document Types in <a href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/1.1.0\/develop\/guides\/sync-gateway\/index.html\">Sync Gateway<\/a> to determine their accessibility from the mobile client side with a particular user.\u00a0 This will lead into the Channel discussion\u00a0on how Couchbase Mobile does read-side security in the next blog of our series.\u00a0 For write-side security, we will explore the key methods in the Sync Function that would enable particular documents coming in from known users to be written to the backend database. <\/span><\/p>\n<h3 style=\"text-align: justify;\">Sync Function<\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #333333; font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;\">Imagine that we have a document or many documents in our database for example where we have a type key that we will reference in our validation code.\u00a0 The heart of Sync Gateway is the implementation logic of the Sync Function and below we see how a document type can be verified for accessibility controls for users in an application. \u00a0 <\/span><\/p>\n<pre><code class=\"\u201cjavascript\" language-javascript=\"\">\u201csync\u201d : \u2018\r\n  function(doc, oldDoc) { \r\n    if (doc.type == \u201cfriends\u201d) {          \/\/Process new friends document\r\n       requireUser(doc.owner);            \/\/The owner of the friends\r\n       access(doc.friends, \u201citems-\u201d+doc.owner);    \r\n       channel(\u201cprivate-\u201d+doc.owner);\r\n       access(doc.owner, \u201cprivate-\u201d+doc.owner)   \r\n    }   \r\n    else if (doc.type == \u201cvehicles\u201d){\r\n       requireUser(doc.owner);          \/\/The owner of the vehicles document\r\n       access(doc.vehicles, \u201citems-\u201d+doc.owner);    \r\n       channel(\u201cprivate-\u201d+doc.owner);\r\n       access(doc.owner, \u201cprivate-\u201d+doc.owner)  \r\n    }\r\n    else{\r\n       requireUser(doc.owner)\r\n       channel(\u201citems-\u201d+doc.owner);  \r\n    }\r\n  }\u2018 \r\n<\/code><\/pre>\n<p style=\"text-align: justify;\">With the &#8216;type&#8217; field in the documents, we can differentiate by specific values of what the document represents.\u00a0 If a document type represents &#8216;schools&#8217; or &#8216;vehicles&#8217; or &#8216;friends&#8217; then from within the Sync Function we can add a switch statement to capture how we will allow for the processing of different document types in different ways from within the Sync Function.\u00a0 What we do first is check for the document type to see that if it is a &#8216;friends&#8217; type and then first see if the document owner property matches the current authenticated user ID through the &#8216;<a href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/1.1.0\/develop\/guides\/sync-gateway\/sync-function-api-guide\/validation\/index.html\">requireUser()<\/a>&#8216; method.\u00a0 If the owner property does match the current authenticated user, then we will give access to a document to all of the friends through the &#8216;items-doc.owner&#8217; channel.\u00a0 This basically means that no one else will see the list of friends that has been invited by the user as that is private only to the user themselves.<\/p>\n<p style=\"text-align: justify;\">The &#8216;else&#8217; clause is where if this is not a friend\u2019s or vehicles&#8217; document,<b> <\/b>then this will be a school&#8217;s item document and again we validate that the owner property matches the current authenticated user ID.\u00a0 As before,<b> <\/b>we add the items to the &#8216;items-&#8216; channel for the item owner property and we give that user access to that channel.<\/p>\n<div>While we updated the Sync Function with the switch logic above, we can actually add an additional test to reject any unknown document types so if it is not a &#8216;friends&#8217; or &#8216;vehicles&#8217; or &#8216;schools&#8217; document\u2019 type, then we will reject the document by calling the &#8216;<a href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/1.1.0\/develop\/guides\/sync-gateway\/sync-function-api-guide\/validation\/index.html\">throw()<\/a>&#8216; method.<\/div>\n<pre><code class=\"\u201cjavascript\" language-javascript=\"\">else{\r\n  throw({forbidden: \u201cInvalid document type\u201d}); \r\n} <\/code><\/pre>\n<p style=\"text-align: justify;\">Instead of the &#8216;requireUser()&#8217; method, we will replace it with the<b> <\/b>&#8216;requireAccess(&#8220;items-&#8220;+doc.owner)&#8217; method where now basically if you want to write a new item to a list, you have to have access to the items channel for the particular user that you want to add the item for.<\/p>\n<pre><code class=\"\u201cjavascript\" language-javascript=\"\" log=\"\" :=\"\" databases=\"\" nlp-sync=\"\" server=\"\" walrus:=\"\" bucket=\"\" users=\"\" sooa=\"\" disabled=\"disabled\" false=\"\" password=\"\" admin_channels=\"\" items-sooa=\"\" will=\"\" items-will=\"\" sync=\"\" function=\"\" doc=\"\" olddoc=\"\" if=\"\" type=\"=\" friends=\"\" process=\"\" new=\"\" document=\"\" requireuser=\"\" owner=\"\" the=\"\" of=\"\" access=\"\" items-=\"\" channel=\"\" private-=\"\" else=\"\" vehicles=\"\" throw=\"\" forbidden:=\"\" invalid=\"\" code=\"\"><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In the previous blog of the Sync Gateway series, we explored how to Authenticate and Authorize users in an application through some of the Sync Gateway features.\u00a0 Building from the series, we will now explore how to validate Document Types [&hellip;]<\/p>\n","protected":false},"author":30,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1810],"tags":[],"ppma_author":[8983],"class_list":["post-2132","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-mobile"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Validate Documents Types in Sync Gateway - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Validate Documents Types in Sync Gateway\" \/>\n<meta property=\"og:description\" content=\"In the previous blog of the Sync Gateway series, we explored how to Authenticate and Authorize users in an application through some of the Sync Gateway features.\u00a0 Building from the series, we will now explore how to validate Document Types [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-26T07:59:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-18T13:43:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"William Hoang, Mobile Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"William Hoang, Mobile Developer Advocate, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\"},\"author\":{\"name\":\"William Hoang, Mobile Developer Advocate, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32\"},\"headline\":\"How to Validate Documents Types in Sync Gateway\",\"datePublished\":\"2016-01-26T07:59:47+00:00\",\"dateModified\":\"2019-05-18T13:43:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\"},\"wordCount\":494,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Couchbase Mobile\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\",\"name\":\"How to Validate Documents Types in Sync Gateway - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-01-26T07:59:47+00:00\",\"dateModified\":\"2019-05-18T13:43:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Validate Documents Types in Sync Gateway\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32\",\"name\":\"William Hoang, Mobile Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/650445f1ea30314c4f3555dd680154f5\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g\",\"caption\":\"William Hoang, Mobile Developer Advocate, Couchbase\"},\"description\":\"William was a Developer Advocate on the Mobile Engineering\/Developer Experience team at Couchbase. His love for coffee and code has transcended him into the world of mobile while appreciating the offline in-person experiences. Prior, William worked on the Developer Relations team over at Twitter, BlackBerry, and Microsoft while also having been a Software Embedded GPS engineer at Research In Motion. William graduated from McGill University in Electrical Software Engineering\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/william-hoang\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Validate Documents Types in Sync Gateway - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/","og_locale":"en_US","og_type":"article","og_title":"How to Validate Documents Types in Sync Gateway","og_description":"In the previous blog of the Sync Gateway series, we explored how to Authenticate and Authorize users in an application through some of the Sync Gateway features.\u00a0 Building from the series, we will now explore how to validate Document Types [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-01-26T07:59:47+00:00","article_modified_time":"2019-05-18T13:43:04+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"William Hoang, Mobile Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"William Hoang, Mobile Developer Advocate, Couchbase","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/"},"author":{"name":"William Hoang, Mobile Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32"},"headline":"How to Validate Documents Types in Sync Gateway","datePublished":"2016-01-26T07:59:47+00:00","dateModified":"2019-05-18T13:43:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/"},"wordCount":494,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["Couchbase Mobile"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/","url":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/","name":"How to Validate Documents Types in Sync Gateway - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-01-26T07:59:47+00:00","dateModified":"2019-05-18T13:43:04+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Validate Documents Types in Sync Gateway"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32","name":"William Hoang, Mobile Developer Advocate, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/650445f1ea30314c4f3555dd680154f5","url":"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g","caption":"William Hoang, Mobile Developer Advocate, Couchbase"},"description":"William was a Developer Advocate on the Mobile Engineering\/Developer Experience team at Couchbase. His love for coffee and code has transcended him into the world of mobile while appreciating the offline in-person experiences. Prior, William worked on the Developer Relations team over at Twitter, BlackBerry, and Microsoft while also having been a Software Embedded GPS engineer at Research In Motion. William graduated from McGill University in Electrical Software Engineering","url":"https:\/\/www.couchbase.com\/blog\/author\/william-hoang\/"}]}},"authors":[{"term_id":8983,"user_id":30,"is_guest":0,"slug":"william-hoang","display_name":"William Hoang, Mobile Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g","author_category":"","last_name":"Hoang","first_name":"William","job_title":"","user_url":"","description":"William was a Developer Advocate on the Mobile Engineering\/Developer Experience team at Couchbase. His love for coffee and code has transcended him into the world of mobile while appreciating the offline in-person experiences. Prior, William worked on the Developer Relations team over at Twitter, BlackBerry, and Microsoft while also having been a Software Embedded GPS engineer at Research In Motion. William graduated from McGill University in Electrical Software Engineering"}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2132"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2132\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2132"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}