{"id":1090,"date":"2022-08-27T02:32:24","date_gmt":"2022-08-28T02:25:19","guid":{"rendered":"https:\/\/www.silicloud.com\/blog\/uncategorized\/a-class-in-kotlin-that-is-sealed\/"},"modified":"2024-03-13T15:39:52","modified_gmt":"2024-03-13T15:39:52","slug":"a-class-in-kotlin-that-is-sealed","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/","title":{"rendered":"A class in Kotlin that is sealed."},"content":{"rendered":"<p>In this tutorial, we will explore Kotlin Sealed Class, its definition, and its purpose. All of these aspects will be discussed in the following sections.<\/p>\n<h2>A Kotlin Sealed Class<\/h2>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/655ce5aac40ba52feef2a3cb\/2-0.png\" alt=\"kotlin sealed class\" \/><\/div>\n<h3>Utilizing Kotlin <a href=\"https:\/\/kotlinlang.org\/docs\/sealed-classes.html\">Sealed<\/a> Classes in practice.<\/h3>\n<p>In Kotlin, the implementation of sealed classes is done as follows.<\/p>\n<pre class=\"post-pre\"><code>sealed class A{\r\n    class B : A()\r\n    class C : A()\r\n}\r\n<\/code><\/pre>\n<p>In order to define a sealed class, the sealed modifier must be added. Sealed classes cannot be created or instantiated, thus making them implicitly abstract. The following example will not function as intended.<\/p>\n<pre class=\"post-pre\"><code>fun main(args: Array&lt;String&gt;) \r\n{\r\n    var a = A() \/\/compiler error. Class A cannot be instantiated.\r\n}\r\n<\/code><\/pre>\n<p>By default, the constructors of a sealed class are private. All subclasses of a sealed class need to be declared in the same file. Sealed classes are crucial for maintaining type safety as they limit the available types during compile-time exclusively.<\/p>\n<pre class=\"post-pre\"><code>sealed class A{\r\n    class B : A() \r\n    {\r\n        class E : A() \/\/this works.\r\n    }\r\n    class C : A()\r\n\r\n    init {\r\n        println(\"sealed class A\")\r\n    }\r\n\r\n}\r\n\r\nclass D : A() \/\/this works\r\n{\r\nclass F: A() \/\/This won't work. Since sealed class is defined in another scope.\r\n}\r\n<\/code><\/pre>\n<p>Building a sealed class by incorporating constructors.<\/p>\n<pre class=\"post-pre\"><code>sealed class A(var name: String){\r\n    class B : A(\"B\")\r\n    class C : A(\"C\")\r\n}\r\n\r\nclass D : A(\"D\")\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>fun main(args: Array&lt;String&gt;) {\r\n    \r\n    var b = A.B()\r\n    var d = D()\r\n}\r\n<\/code><\/pre>\n<p>One possible paraphrase could be:<br \/>\nIncorporating Data Class and Object within a sealed class.<\/p>\n<pre class=\"post-pre\"><code>fun main(args: Array&lt;String&gt;) {\r\n\r\n    val e = A.E(\"Anupam\")\r\n    println(e) \/\/prints E(name=Anupam)\r\n\r\n    var d = A.D\r\n    d.name() \/\/prints Object D\r\n}\r\n\r\n\r\nsealed class A{\r\n    class B : A()\r\n    class C : A()\r\n    object D : A()\r\n    {\r\n         fun name()\r\n         {\r\n             println(\"Object D\")\r\n         }\r\n    }\r\n    data class E(var name: String) : A()\r\n\r\n}\r\n<\/code><\/pre>\n<h3>What is the distinction between enum and sealed classes?<\/h3>\n<p>Sealed classes in Kotlin can be thought of as enhanced versions of Enum classes. Unlike Enums, which only allow us to use the same type for all enum constants, sealed classes enable us to create instances with different types. Thus, the capability described above is not achievable with Enum classes.<\/p>\n<pre class=\"post-pre\"><code>enum class Months(string: String){\r\nJanuary(\"Jan\"), February(2),\r\n}\r\n<\/code><\/pre>\n<p>Sealed classes come to our aid in situations where we need multiple instances, unlike enum classes which only allow a single type for all constants.<\/p>\n<pre class=\"post-pre\"><code>sealed class Months {\r\n    class January(var shortHand: String) : Months()\r\n    class February(var number: Int) : Months()\r\n    class March(var shortHand: String, var number: Int) : Months()\r\n}\r\n<\/code><\/pre>\n<p>In your Projects, how can you incorporate this Sealed classes feature? For example, in an application similar to a newsfeed, you can generate three distinct class categories for posts: Status, Image, and Video.<\/p>\n<pre class=\"post-pre\"><code>sealed class Post\r\n{\r\n    class Status(var text: String) : Post()\r\n    class Image(var url: String, var caption: String) : Post()\r\n    class Video(var url: String, var timeDuration: Int, var encoding: String): Post()\r\n}\r\n<\/code><\/pre>\n<p>It is not feasible to accomplish this using Enum classes.<\/p>\n<h3>Sealed classes and when statements are the same.<\/h3>\n<p>When using sealed classes, it is typical to incorporate them alongside when statements as each subclass and their respective types function as cases. Additionally, the use of sealed classes restricts the available types. As a result, removing the else portion of the when statement becomes a straightforward task. The following example illustrates this concept.<\/p>\n<pre class=\"post-pre\"><code>sealed class Shape{\r\n    class Circle(var radius: Float): Shape()\r\n    class Square(var length: Int): Shape()\r\n    class Rectangle(var length: Int, var breadth: Int): Shape()\r\n}\r\n\r\nfun eval(e: Shape) =\r\n        when (e) {\r\n            is Shape.Circle -&gt; println(\"Circle area is ${3.14*e.radius*e.radius}\")\r\n            is Shape.Square -&gt; println(\"Square area is ${e.length*e.length}\")\r\n            is Shape.Rectangle -&gt; println(\"Rectagle area is ${e.length*e.breadth}\")\r\n        }\r\n<\/code><\/pre>\n<p>We need to execute the eval function within our main function as demonstrated below.<\/p>\n<pre class=\"post-pre\"><code>fun main(args: Array&lt;String&gt;) {\r\n\r\n    var circle = Shape.Circle(4.5f)\r\n    var square = Shape.Square(4)\r\n    var rectangle = Shape.Rectangle(4,5)\r\n\r\n    eval(circle)\r\n    eval(square)\r\n    eval(rectangle)\r\n    \/\/eval(x) \/\/compile-time error.\r\n\r\n}\r\n\r\n\/\/Following is printed on the console:\r\n\/\/Circle area is 63.585\r\n\/\/Square area is 16\r\n\/\/Rectangle area is 20\r\n<\/code><\/pre>\n<p>Please note that the &#8220;is&#8221; modifier is used to check if a class belongs to a specific type. However, this modifier is only necessary for classes and not for Kotlin objects, as demonstrated in the example below.<\/p>\n<pre class=\"post-pre\"><code>sealed class Shape{\r\n    class Circle(var radius: Float): Shape()\r\n    class Square(var length: Int): Shape()\r\n    object Rectangle: Shape()\r\n    {\r\n        var length: Int = 0\r\n        var breadth : Int = 0\r\n    }\r\n}\r\n\r\nfun eval(e: Shape) =\r\n        when (e) {\r\n            is Shape.Circle -&gt; println(\"Circle area is ${3.14*e.radius*e.radius}\")\r\n            is Shape.Square -&gt; println(\"Square area is ${e.length*e.length}\")\r\n            Shape.Rectangle -&gt; println(\"Rectangle area is ${Shape.Rectangle.length*Shape.Rectangle.breadth}\")\r\n        }\r\n<\/code><\/pre>\n<p>The Kotlin sealed class tutorial has reached its conclusion. Check out the Kotlin Docs for further references.<\/p>\n<p>&nbsp;<\/p>\n<p>more tutorials<\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/how-can-a-pandas-dataframe-be-acquired-from-an-api-endpoint-that-lacks-order\/\" target=\"_blank\" rel=\"noopener\">get pandas DataFrame from an API endpoint that lacks order?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/init-or-swift-initialization-in-swift\/\" target=\"_blank\" rel=\"noopener\">init or Swift initialization in Swift<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/the-command-design-pattern\/\" target=\"_blank\" rel=\"noopener\">The Command design pattern.<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/spring-component-annotation\/\" target=\"_blank\" rel=\"noopener\">Spring Component annotation<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/ios-progress-bar-also-known-as-progress-view\/\" target=\"_blank\" rel=\"noopener\">Progress Bar iOS also known as Progress View<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will explore Kotlin Sealed Class, its definition, and its purpose. All of these aspects will be discussed in the following sections. A Kotlin Sealed Class Utilizing Kotlin Sealed Classes in practice. In Kotlin, the implementation of sealed classes is done as follows. sealed class A{ class B : A() class C [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1090","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>A class in Kotlin that is sealed. - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"In this tutorial, we will explore Kotlin Sealed Class, its definition, and its purpose. All of these aspects will be discussed in the\" \/>\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.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A class in Kotlin that is sealed.\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we will explore Kotlin Sealed Class, its definition, and its purpose. All of these aspects will be discussed in the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/SiliCloudGlobal\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-28T02:25:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-13T15:39:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/655ce5aac40ba52feef2a3cb\/2-0.png\" \/>\n<meta name=\"author\" content=\"Benjamin Taylor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SiliCloudGlobal\" \/>\n<meta name=\"twitter:site\" content=\"@SiliCloudGlobal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Benjamin Taylor\" \/>\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.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/\"},\"author\":{\"name\":\"Benjamin Taylor\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/ac801fe9549a25960ce48aa2e0a691c9\"},\"headline\":\"A class in Kotlin that is sealed.\",\"datePublished\":\"2022-08-28T02:25:19+00:00\",\"dateModified\":\"2024-03-13T15:39:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/\"},\"wordCount\":470,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\"},\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/\",\"url\":\"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/\",\"name\":\"A class in Kotlin that is sealed. - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#website\"},\"datePublished\":\"2022-08-28T02:25:19+00:00\",\"dateModified\":\"2024-03-13T15:39:52+00:00\",\"description\":\"In this tutorial, we will explore Kotlin Sealed Class, its definition, and its purpose. All of these aspects will be discussed in the\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.silicloud.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A class in Kotlin that is sealed.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/blog\/\",\"name\":\"Silicon Cloud Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\",\"name\":\"Silicon Cloud Blog\",\"url\":\"https:\/\/www.silicloud.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png\",\"contentUrl\":\"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png\",\"width\":1024,\"height\":1024,\"caption\":\"Silicon Cloud Blog\"},\"image\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/SiliCloudGlobal\/\",\"https:\/\/twitter.com\/SiliCloudGlobal\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/ac801fe9549a25960ce48aa2e0a691c9\",\"name\":\"Benjamin Taylor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ec2e3d3e2d525fd148047c4520ae7c1cdccd1f4b48a1a488422b31f04f345c14?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ec2e3d3e2d525fd148047c4520ae7c1cdccd1f4b48a1a488422b31f04f345c14?s=96&d=mm&r=g\",\"caption\":\"Benjamin Taylor\"},\"url\":\"https:\/\/www.silicloud.com\/blog\/author\/benjamintaylor\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"A class in Kotlin that is sealed. - Blog - Silicon Cloud","description":"In this tutorial, we will explore Kotlin Sealed Class, its definition, and its purpose. All of these aspects will be discussed in the","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.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/","og_locale":"en_US","og_type":"article","og_title":"A class in Kotlin that is sealed.","og_description":"In this tutorial, we will explore Kotlin Sealed Class, its definition, and its purpose. All of these aspects will be discussed in the","og_url":"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/","og_site_name":"Blog - Silicon Cloud","article_publisher":"https:\/\/www.facebook.com\/SiliCloudGlobal\/","article_published_time":"2022-08-28T02:25:19+00:00","article_modified_time":"2024-03-13T15:39:52+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/655ce5aac40ba52feef2a3cb\/2-0.png"}],"author":"Benjamin Taylor","twitter_card":"summary_large_image","twitter_creator":"@SiliCloudGlobal","twitter_site":"@SiliCloudGlobal","twitter_misc":{"Written by":"Benjamin Taylor","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/#article","isPartOf":{"@id":"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/"},"author":{"name":"Benjamin Taylor","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/ac801fe9549a25960ce48aa2e0a691c9"},"headline":"A class in Kotlin that is sealed.","datePublished":"2022-08-28T02:25:19+00:00","dateModified":"2024-03-13T15:39:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/"},"wordCount":470,"commentCount":0,"publisher":{"@id":"https:\/\/www.silicloud.com\/blog\/#organization"},"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/","url":"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/","name":"A class in Kotlin that is sealed. - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/blog\/#website"},"datePublished":"2022-08-28T02:25:19+00:00","dateModified":"2024-03-13T15:39:52+00:00","description":"In this tutorial, we will explore Kotlin Sealed Class, its definition, and its purpose. All of these aspects will be discussed in the","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/blog\/a-class-in-kotlin-that-is-sealed\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.silicloud.com\/blog\/"},{"@type":"ListItem","position":2,"name":"A class in Kotlin that is sealed."}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/blog\/#website","url":"https:\/\/www.silicloud.com\/blog\/","name":"Silicon Cloud Blog","description":"","publisher":{"@id":"https:\/\/www.silicloud.com\/blog\/#organization"},"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.silicloud.com\/blog\/#organization","name":"Silicon Cloud Blog","url":"https:\/\/www.silicloud.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png","contentUrl":"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png","width":1024,"height":1024,"caption":"Silicon Cloud Blog"},"image":{"@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/SiliCloudGlobal\/","https:\/\/twitter.com\/SiliCloudGlobal"]},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/ac801fe9549a25960ce48aa2e0a691c9","name":"Benjamin Taylor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ec2e3d3e2d525fd148047c4520ae7c1cdccd1f4b48a1a488422b31f04f345c14?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ec2e3d3e2d525fd148047c4520ae7c1cdccd1f4b48a1a488422b31f04f345c14?s=96&d=mm&r=g","caption":"Benjamin Taylor"},"url":"https:\/\/www.silicloud.com\/blog\/author\/benjamintaylor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/1090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/comments?post=1090"}],"version-history":[{"count":0,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/1090\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/media?parent=1090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/categories?post=1090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/tags?post=1090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}