{"id":1090,"date":"2018-07-30T22:58:03","date_gmt":"2018-07-30T20:58:03","guid":{"rendered":"http:\/\/www.albertopasca.it\/whiletrue\/?p=1090"},"modified":"2018-07-29T20:05:40","modified_gmt":"2018-07-29T18:05:40","slug":"swift-chaining-methods","status":"publish","type":"post","link":"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/","title":{"rendered":"Swift &#8211; Chaining methods"},"content":{"rendered":"<p>Very often in Swift, you can see various methods called one each other and linked by a dot &#8220;.&#8221;.<\/p>\n<p>These methods are called chained methods. Probably\u00a0using Alamofire you already have seen this behaviour:<\/p>\n<p><!--more--><\/p>\n<div class=\"highlight highlight-source-swift\">\n<pre>Alamofire\r\n    .<strong><span class=\"pl-c1\">request<\/span><\/strong>(<span class=\"pl-s\"><span class=\"pl-pds\">\"<\/span>https:\/\/httpbin.org\/basic-auth\/<span class=\"pl-pse\">\\(<\/span><span class=\"pl-s1\">user<\/span><span class=\"pl-pse\"><span class=\"pl-s1\">)<\/span><\/span>\/<span class=\"pl-pse\">\\(<\/span><span class=\"pl-s1\">password<\/span><span class=\"pl-pse\"><span class=\"pl-s1\">)<\/span><\/span><span class=\"pl-pds\">\"<\/span><\/span>)\r\n    .<strong><span class=\"pl-c1\">authenticate<\/span><\/strong>(<span class=\"pl-c1\">user<\/span>: user, <span class=\"pl-c1\">password<\/span>: password)\r\n    .<strong><span class=\"pl-smi\">responseJSON<\/span><\/strong> { response <span class=\"pl-k\">in<\/span>\r\n        <span class=\"pl-c1\">debugPrint<\/span>(response)\r\n    }<\/pre>\n<p>In this piece of code,<\/p>\n<ul>\n<li><em>request<\/em><\/li>\n<li><em>authenticate<\/em><\/li>\n<li><em>responseJSON<\/em><\/li>\n<\/ul>\n<p>are three different methods that return an <em>Alamofire<\/em> object (<strong>self<\/strong>).<\/p>\n<p>It&#8217;s very easy to do, but let&#8217;s see how it works and how we can do the same things!<\/p>\n<\/div>\n<p>Let&#8217;s take a look at this basic class:<\/p>\n<pre class=\"p1\"><span class=\"s1\">class<\/span> StringOperationsWithoutChain {\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">var<\/span> theString = <span class=\"s2\">\"\"<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><strong><span class=\"s1\">init<\/span><\/strong>(str: <span class=\"s3\">String<\/span>) { <span class=\"s4\">theString<\/span> = str }\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">func<\/span> <strong>appendZero<\/strong>() -&gt; <span class=\"s3\">String<\/span> { <span class=\"s1\">return<\/span> <span class=\"s2\">\"<\/span>\\<span class=\"s2\">(<\/span><span class=\"s4\">theString<\/span><span class=\"s2\">)0\"<\/span> }\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">func<\/span> <strong>appendOne<\/strong>()<span class=\"Apple-converted-space\">\u00a0 <\/span>-&gt; <span class=\"s3\">String<\/span> { <span class=\"s1\">return<\/span> <span class=\"s2\">\"<\/span>\\<span class=\"s2\">(<\/span><span class=\"s4\">theString<\/span><span class=\"s2\">)1\"<\/span> }\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">func<\/span> <strong>appendIcs<\/strong>()<span class=\"Apple-converted-space\">\u00a0 <\/span>-&gt; <span class=\"s3\">String<\/span> { <span class=\"s1\">return<\/span> <span class=\"s2\">\"<\/span>\\<span class=\"s2\">(<\/span><span class=\"s4\">theString<\/span><span class=\"s2\">)x\"<\/span> }\r\n}<\/pre>\n<p>this class contains a simple init, and three (useless) methods.<\/p>\n<p>You can use this class in this way:<\/p>\n<pre class=\"p1\"><span class=\"s1\">let<\/span><span class=\"s2\"> str = <\/span>StringOperationsWithoutChain<span class=\"s2\">(str: <\/span><span class=\"s3\">\"pippo\"<\/span><span class=\"s2\">).<\/span><strong><span class=\"s4\">appendIcs<\/span><\/strong><span class=\"s2\">()<\/span>\r\nprint<span class=\"s2\">( <\/span><span class=\"s5\">str<\/span><span class=\"s2\"> )<\/span><\/pre>\n<p>You create the class\u00a0<strong>StringOperationsWithoutChain(str: &#8221; &#8220;)<\/strong> and next you call one of the methods inside.<\/p>\n<p>You can do the same with:<\/p>\n<pre class=\"p1\"><span class=\"s1\">let<\/span><span class=\"s2\"> str = <\/span>StringOperationsWithoutChain<span class=\"s2\">(str: <\/span><span class=\"s3\">\"pippo\"<\/span><span class=\"s2\">)<\/span>\r\n<span class=\"s4\">str<\/span><span class=\"s2\">.<\/span>appendIcs<span class=\"s2\">()<\/span>\r\nprint<span class=\"s2\">( <\/span><span class=\"s4\">str<\/span><span class=\"s2\"> )<\/span><\/pre>\n<p>You&#8217;re able to do this because str is of type\u00a0<em>StringOperationsWithoutChain.<\/em><\/p>\n<h6>Let&#8217;s chain now:<\/h6>\n<p>We can use the same class, refactored to be chainable. All the functions that we want to use in a chain <em>must return the class itself<\/em>.<\/p>\n<p>Example:<\/p>\n<pre class=\"p1\"><span class=\"s1\">class<\/span> StringOperations {\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">var<\/span> theString = <span class=\"s2\">\"\"<\/span>\r\n\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">init<\/span>(str: <span class=\"s3\">String<\/span>) { \/\/ chainable, returns implicitly self\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span class=\"s4\">theString<\/span> = str\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>}\r\n\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">func<\/span> <strong>appendZero<\/strong>() -&gt; <strong><span class=\"s3\">StringOperations<\/span><\/strong> { \/\/ chainable\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span class=\"s4\">theString<\/span> += <span class=\"s2\">\"0\"<\/span>\r\n<span class=\"s5\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/span>return self\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>}\r\n\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">func<\/span> <strong>appendOne<\/strong>() -&gt; <strong><span class=\"s3\">StringOperations<\/span><\/strong> { \/\/ chainable\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span class=\"s4\">theString<\/span> += <span class=\"s2\">\"1\"<\/span>\r\n<span class=\"s5\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/span>return self\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>}\r\n\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">func<\/span> <strong>appendIcs<\/strong>() -&gt; <strong><span class=\"s3\">StringOperations<\/span><\/strong> {\/\/ chainable\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span class=\"s4\">theString<\/span> += <span class=\"s2\">\"x\"<\/span>\r\n<span class=\"s5\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/span>return self\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>}\r\n\r\n    \/\/ not chainable\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">func<\/span> <strong>printCallback<\/strong>(completion: <span class=\"s1\">@escaping<\/span> (<span class=\"s1\">_<\/span> result: <span class=\"s3\">String<\/span>) -&gt; <span class=\"s3\">Void<\/span>) {\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0   \u00a0 <\/span>completion(<span class=\"s4\">theString<\/span>)\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>}\r\n}<\/pre>\n<p>How to use this class?<\/p>\n<pre class=\"p1\">\/\/ initialize\r\nStringOperations<span class=\"s1\">(str: <\/span><span class=\"s2\">\"pippo\"<\/span><span class=\"s1\">)<\/span><\/pre>\n<p>and next we can chain all the methods you want:<\/p>\n<pre class=\"p1\">StringOperations<span class=\"s1\">(str: <\/span><span class=\"s2\">\"pippo\"<\/span><span class=\"s1\">)<\/span>\r\n<span class=\"s1\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>.<\/span>appendOne<span class=\"s1\">()<\/span>\r\n<span class=\"s1\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>.<\/span>appendZero<span class=\"s1\">()<\/span>\r\n<span class=\"s1\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>.<\/span>appendIcs<span class=\"s1\">()<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>.<span class=\"s3\">printCallback<\/span> { (result) <span class=\"s4\">in<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span class=\"s3\">print<\/span>( result )\r\n}<\/pre>\n<p>You create a string &#8220;<strong>pippo<\/strong>&#8221; and next add &#8220;<strong>1<\/strong>&#8220;, &#8220;<strong>0<\/strong>&#8221; and &#8220;<strong>X<\/strong>&#8221; to this string and print in a callback the result.<\/p>\n<p>As you can confirm, is very simple and very useful!<\/p>\n<p>Result in the console:<\/p>\n<pre class=\"p1\"><span class=\"s1\">pippo10x<\/span><\/pre>\n<p>Can be of course more interesting that appending values to a string. It&#8217;s just to make the idea and explain how it works.<\/p>\n<p>Happy chain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Very often in Swift, you can see various methods called one each other and linked by a dot &#8220;.&#8221;. These methods are called chained methods. Probably\u00a0using Alamofire you already have seen this behaviour:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[687,686,682,683,684,685,222,46],"class_list":["post-1090","post","type-post","status-publish","format-standard","hentry","category-generic","tag-alamofire","tag-append","tag-chain","tag-chainable-methods","tag-closures","tag-completion","tag-string","tag-swift"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Swift - Chaining methods - while (true) {\u00a0}<\/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.albertopasca.it\/whiletrue\/swift-chaining-methods\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Swift - Chaining methods - while (true) {\u00a0}\" \/>\n<meta property=\"og:description\" content=\"Very often in Swift, you can see various methods called one each other and linked by a dot &#8220;.&#8221;. These methods are called chained methods. Probably\u00a0using Alamofire you already have seen this behaviour:\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/\" \/>\n<meta property=\"og:site_name\" content=\"while (true) {\u00a0}\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-30T20:58:03+00:00\" \/>\n<meta name=\"author\" content=\"Alberto Pasca\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lupasca\" \/>\n<meta name=\"twitter:site\" content=\"@lupasca\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alberto Pasca\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/swift-chaining-methods\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/swift-chaining-methods\\\/\"},\"author\":{\"name\":\"Alberto Pasca\",\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\"},\"headline\":\"Swift &#8211; Chaining methods\",\"datePublished\":\"2018-07-30T20:58:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/swift-chaining-methods\\\/\"},\"wordCount\":242,\"publisher\":{\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\"},\"keywords\":[\"alamofire\",\"append\",\"chain\",\"chainable methods\",\"closures\",\"completion\",\"string\",\"swift\"],\"articleSection\":[\"generic\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/swift-chaining-methods\\\/\",\"url\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/swift-chaining-methods\\\/\",\"name\":\"Swift - Chaining methods - while (true) {\u00a0}\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#website\"},\"datePublished\":\"2018-07-30T20:58:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/swift-chaining-methods\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/swift-chaining-methods\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/swift-chaining-methods\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Swift &#8211; Chaining methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#website\",\"url\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/\",\"name\":\"while (true) {\u00a0}\",\"description\":\"notes from a developer, tutorials, how-to, ideas\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\",\"name\":\"Alberto Pasca\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\",\"caption\":\"Alberto Pasca\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\"},\"description\":\"Software engineer @ Pirelli &amp; C. S.p.A. with a strong passion for mobile \uf8ff development, security, and connected things.\",\"sameAs\":[\"https:\\\/\\\/www.albertopasca.it\",\"albertopasca\",\"https:\\\/\\\/x.com\\\/lupasca\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Swift - Chaining methods - while (true) {\u00a0}","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.albertopasca.it\/whiletrue\/swift-chaining-methods\/","og_locale":"en_US","og_type":"article","og_title":"Swift - Chaining methods - while (true) {\u00a0}","og_description":"Very often in Swift, you can see various methods called one each other and linked by a dot &#8220;.&#8221;. These methods are called chained methods. Probably\u00a0using Alamofire you already have seen this behaviour:","og_url":"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/","og_site_name":"while (true) {\u00a0}","article_published_time":"2018-07-30T20:58:03+00:00","author":"Alberto Pasca","twitter_card":"summary_large_image","twitter_creator":"@lupasca","twitter_site":"@lupasca","twitter_misc":{"Written by":"Alberto Pasca","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/#article","isPartOf":{"@id":"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/"},"author":{"name":"Alberto Pasca","@id":"https:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac"},"headline":"Swift &#8211; Chaining methods","datePublished":"2018-07-30T20:58:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/"},"wordCount":242,"publisher":{"@id":"https:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac"},"keywords":["alamofire","append","chain","chainable methods","closures","completion","string","swift"],"articleSection":["generic"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/","url":"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/","name":"Swift - Chaining methods - while (true) {\u00a0}","isPartOf":{"@id":"https:\/\/www.albertopasca.it\/whiletrue\/#website"},"datePublished":"2018-07-30T20:58:03+00:00","breadcrumb":{"@id":"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.albertopasca.it\/whiletrue\/swift-chaining-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.albertopasca.it\/whiletrue\/"},{"@type":"ListItem","position":2,"name":"Swift &#8211; Chaining methods"}]},{"@type":"WebSite","@id":"https:\/\/www.albertopasca.it\/whiletrue\/#website","url":"https:\/\/www.albertopasca.it\/whiletrue\/","name":"while (true) {\u00a0}","description":"notes from a developer, tutorials, how-to, ideas","publisher":{"@id":"https:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.albertopasca.it\/whiletrue\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac","name":"Alberto Pasca","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g","caption":"Alberto Pasca"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g"},"description":"Software engineer @ Pirelli &amp; C. S.p.A. with a strong passion for mobile \uf8ff development, security, and connected things.","sameAs":["https:\/\/www.albertopasca.it","albertopasca","https:\/\/x.com\/lupasca"]}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts\/1090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/comments?post=1090"}],"version-history":[{"count":4,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts\/1090\/revisions"}],"predecessor-version":[{"id":1094,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts\/1090\/revisions\/1094"}],"wp:attachment":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/media?parent=1090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/categories?post=1090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/tags?post=1090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}