

{"id":118602,"date":"2023-10-10T19:00:42","date_gmt":"2023-10-10T13:30:42","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=118602"},"modified":"2023-10-10T19:19:18","modified_gmt":"2023-10-10T13:49:18","slug":"swift-literals","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/swift-literals\/","title":{"rendered":"Swift Literals"},"content":{"rendered":"<p>When programming, we encounter data represented in its raw form, like numbers, strings, or booleans. To express these values in our code, Swift provides literals. Literals represent the fixed value in our code. Integer, Boolean, and String literals are some of the literals supported in Swift.<\/p>\n<p><strong>The table below represents some of the standard literals.<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Literal<\/b><\/td>\n<td><b>Literal Data Type\u00a0<\/b><\/td>\n<td><b>Example<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Integer\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">Int<\/span><\/td>\n<td><span style=\"font-weight: 400\">2023<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Floating-Point<\/span><\/td>\n<td><span style=\"font-weight: 400\">Double<\/span><\/td>\n<td><span style=\"font-weight: 400\">20.23<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Character<\/span><\/td>\n<td><span style=\"font-weight: 400\">Character<\/span><\/td>\n<td><span style=\"font-weight: 400\">&#8220;D&#8221;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">String<\/span><\/td>\n<td><span style=\"font-weight: 400\">String<\/span><\/td>\n<td><span style=\"font-weight: 400\">&#8220;DataFlair&#8221;<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Boolean<\/span><\/td>\n<td><span style=\"font-weight: 400\">Bool<\/span><\/td>\n<td><span style=\"font-weight: 400\">true<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Nil<\/span><\/td>\n<td><span style=\"font-weight: 400\">Optional<\/span><\/td>\n<td><span style=\"font-weight: 400\">nil<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Array<\/span><\/td>\n<td><span style=\"font-weight: 400\">Array<\/span><\/td>\n<td><span style=\"font-weight: 400\">[4,8,20]<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Dictionary<\/span><\/td>\n<td><span style=\"font-weight: 400\">Dictionary<\/span><\/td>\n<td><span style=\"font-weight: 400\">[&#8220;DataFlair&#8221;: 2023, &#8220;Swift&#8221;: 1973]<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>In this article, we will dive into Swift literals, examining their usage for integers, strings, booleans, and more. We\u2019ll also learn how they simplify data representation and enhance code efficiency.<\/p>\n<h3>Integer Literals<\/h3>\n<p>Integer literals represent numbers without any fractional component. It can be positive or negative. It can be expressed in different formats like decimal, binary, octal or hexadecimal.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let integerLiteral: Int = 2023\r\nprint(integerLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>2023<\/p>\n<h4>Binary Integer Literals<\/h4>\n<p>Binary Integer Literals represent binary values. It begins with 0b.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let binaryLiteral: Int = 0b11111100111\r\nprint(binaryLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>2023<\/p>\n<h4>Octal Integer Literals<\/h4>\n<p>Octal Integer Literals represent octal values. It begins with 0o.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let octalLiteral: Int = 0o3747\r\nprint(octalLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>2023<\/p>\n<h4>Hexadecimal Integer Literals<\/h4>\n<p>Hexadecimal Integer Literals represent hexadecimal values. It begins with 0x.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let hexadecimalLiteral: Int = 0x7E7\r\nprint(hexadecimalLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>2023<\/p>\n<h4>Decimal Integer Literals<\/h4>\n<p>Decimal Integer Literals represent decimal values. Every integer literal declared is of decimal type.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let decimalLiteral: Int = 2023\r\nprint(decimalLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>2023<\/p>\n<h3>Floating-Point Literals<\/h3>\n<p>Floating-point literals are used to represent numbers with fractional components. They can be expressed in different formats like decimal &amp; hexadecimal.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let floatingLiteral: Float = 2023.07\r\nprint(floatingLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>2023.07<\/p>\n<h4>Decimal Floating-Point Literals<\/h4>\n<p>Decimal Floating-Point Literals represent decimal values.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let floatingLiteral: Float = 2023.07\r\nprint(floatingLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>2023.07<\/p>\n<h4>Hexadecimal Floating-Point Literals<\/h4>\n<p>Hexadecimal Floating-Point Literals represent hexadecimal values. It begins with 0x.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let floatingLiteral: Float = 0xF10\r\nprint(floatingLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>3856.0<\/p>\n<h3>Character Literals<\/h3>\n<p>Character literals are individual Unicode values, which are numerical representations of unique characters. It handles single characters in Swift. It represents individual textual elements. It can be letters, digits, punctuation marks, symbols, and whitespace.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let characterLiteral: Character = \"D\"\r\nprint(characterLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>D<\/p>\n<h3>String Literals<\/h3>\n<p>String literals represent a sequence of characters enclosed within double quotes. It can have a combination of letters, numbers or symbols.<\/p>\n<h4>Basic String Literal<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let stringLiteral: String = \"DataFlair\"\r\nprint(stringLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>DataFlair<\/p>\n<h4>Multi-Line String Literal<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let multiLineStringLiteral: String = \"\"\"\r\n    DataFlair.\r\n    Example of a multi-line string.\r\n    \"\"\"\r\nprint(multiLineStringLiteral)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>DataFlair.<br \/>\nExample of a multi-line string.<\/p>\n<h4>String Interpolation<\/h4>\n<p>String interpolation allows the inclusion of identifier values within a string.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let name: String = \"DataFlair\"\r\nlet message: String = \"Hi from \\(name)!\"\r\n\r\nprint(message)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>Hi from DataFlair!<\/p>\n<h4>Escape Sequence Character<\/h4>\n<p>String literals cannot have unescaped characters like backslash (\\) or double quotes (\u201c). These special characters can be written in a string literal using escape sequences. The table below represents the escape sequence for the character, along with its description.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Escape Sequence Character<\/b><\/td>\n<td><b>Escape Sequence<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Null Character<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Back Slash<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\\\<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Backspace\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\b<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Form Feed<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\f<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Newline<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\n<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Carriage Return<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\r<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Horizontal Tab<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\t<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Vertical Tab<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\v<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Single Quote<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\\u2018<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Double Quote<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Octal number<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\000<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Hexadecimal number<\/span><\/td>\n<td><span style=\"font-weight: 400\">\\xhh<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Boolean Literals<\/h3>\n<p>Boolean literals represent boolean values, either true or false. They are commonly used for logical comparisons and control flow in our programs.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let booleanLiteral: Bool = true\r\n\r\nprint(booleanLiteral)\r\n\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>true<\/p>\n<h3>Type Alias<\/h3>\n<p>Type aliases are alternative names for existing data types. By using the typealias keyword, we can define custom names for complex data types. They help to improve code readability when working with lengthy data types. It makes the codebase more maintainable and clear.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let example: (String, Int)\t\t\t\t\t\t\/\/ Original Type\r\ntypealias typeAliasExample = (name: String, year: Int)\t\/\/ Type Alias\r\nlet example1 : typeAliasExample  = (\"DataFlair\", 2023)\t\/\/ Usage of Type Alias\r\nprint(example1)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>(name: &#8220;DataFlair&#8221;, year: 2023)<\/p>\n<h3>Type Inference<\/h3>\n<p>Swift has one powerful capability, which is type inference. It means the compiler can automatically deduce the data type of a variable based on the context.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">let intExample = 2023 \t\t      \/\/ infers it as an Int\r\nlet stringExample = \"DataFlair\" \t\/\/ infers it as a String\r\n\r\nprint(stringExample, intExample)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>DataFlair 2023<\/p>\n<h3>Conclusion<\/h3>\n<p>Swift literals simplify data representation by directly expressing fixed values in code. Integers, floating-point numbers, characters, and strings are among the supported literals, enabling more expressive and efficient app development. By leveraging Swift literals, we can create concise and readable code, leading to more effective and maintainable applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When programming, we encounter data represented in its raw form, like numbers, strings, or booleans. To express these values in our code, Swift provides literals. Literals represent the fixed value in our code. Integer,&#46;&#46;&#46;<\/p>\n","protected":false},"author":581,"featured_media":118604,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27789],"tags":[28314,28312,28311,28310,28313,28309,28287,28315],"class_list":["post-118602","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-swift-tutorials","tag-boolean-literals","tag-character-literals","tag-floating-point-literals","tag-integer-literals","tag-string-literals","tag-swift-literals","tag-swift-tutorials","tag-type-interface"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Swift Literals - DataFlair<\/title>\n<meta name=\"description\" content=\"Swift literals simplify data representation by directly expressing fixed values in code. By Swift literals, we can create concise and readable code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/swift-literals\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Swift Literals - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Swift literals simplify data representation by directly expressing fixed values in code. By Swift literals, we can create concise and readable code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/swift-literals\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-10T13:30:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-10T13:49:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/08\/swift-literals.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Swift Literals - DataFlair","description":"Swift literals simplify data representation by directly expressing fixed values in code. By Swift literals, we can create concise and readable code.","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:\/\/data-flair.training\/blogs\/swift-literals\/","og_locale":"en_US","og_type":"article","og_title":"Swift Literals - DataFlair","og_description":"Swift literals simplify data representation by directly expressing fixed values in code. By Swift literals, we can create concise and readable code.","og_url":"https:\/\/data-flair.training\/blogs\/swift-literals\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-10-10T13:30:42+00:00","article_modified_time":"2023-10-10T13:49:18+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/08\/swift-literals.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445"},"headline":"Swift Literals","datePublished":"2023-10-10T13:30:42+00:00","dateModified":"2023-10-10T13:49:18+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/"},"wordCount":575,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/08\/swift-literals.webp","keywords":["boolean literals","character literals","floating point literals","integer literals","string literals","swift literals","swift tutorials","type interface"],"articleSection":["Swift Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/swift-literals\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/","url":"https:\/\/data-flair.training\/blogs\/swift-literals\/","name":"Swift Literals - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/08\/swift-literals.webp","datePublished":"2023-10-10T13:30:42+00:00","dateModified":"2023-10-10T13:49:18+00:00","description":"Swift literals simplify data representation by directly expressing fixed values in code. By Swift literals, we can create concise and readable code.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/swift-literals\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/08\/swift-literals.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/08\/swift-literals.webp","width":1200,"height":628,"caption":"swift literals"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/swift-literals\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Swift Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/swift-tutorials\/"},{"@type":"ListItem","position":3,"name":"Swift Literals"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam6\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/118602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=118602"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/118602\/revisions"}],"predecessor-version":[{"id":122756,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/118602\/revisions\/122756"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/118604"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=118602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=118602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=118602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}