{"id":116,"date":"2024-02-13T15:53:48","date_gmt":"2024-02-13T15:53:48","guid":{"rendered":"https:\/\/www.xopsschool.com\/tutorials\/?p=116"},"modified":"2024-02-29T18:22:31","modified_gmt":"2024-02-29T18:22:31","slug":"what-is-yaml","status":"publish","type":"post","link":"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/","title":{"rendered":"What is Yaml?"},"content":{"rendered":"\n<p>YAML is a way to organize and store data in a format that&#8217;s easy for both humans and computers to read. It&#8217;s commonly used for creating configuration files. Some say YAML stands for &#8220;yet another markup language,&#8221; highlighting its purpose for data, not documents. YAML is liked in programming because it&#8217;s simple to read and work with. It can be used alongside other programming languages. Ansible, a tool for automation, uses YAML in its playbooks to define tasks and processes easily.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">YAML Syntax Example?<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#Comment: Student record\n#Describes some characteristics and preferences\n---\nname: Martin D'vloper #key-value\nage: 26\nhobbies: \n  - painting #first list item\n  - playing_music #second list item\n  - cooking #third list item\nprogramming_languages:\n  java: Intermediate\n  python: Advanced\n  javascript: Beginner\nfavorite_food: \n  - vegetables: tomatoes \n  - fruits: \n      citrics: oranges \n      tropical: bananas\n      nuts: peanuts\n      sweets: raisins<\/code><\/pre>\n\n\n\n<p><strong>What is YAML used for?<\/strong><\/p>\n\n\n\n<p>YAML is a widely used language for organizing and storing data in a way that&#8217;s simple for both people and computers to grasp. It&#8217;s known for being easy to read and understand, making it popular in the programming world. It&#8217;s not exactly a programming language itself, but it plays well with other programming languages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is json?  <\/h2>\n\n\n\n<p>JSON means JavaScript Object Notation and has been used since the early 2000s. It got its start from JavaScript but works with many languages, not just JavaScript.Almost all modern programming languages can work with JSON using special tools or libraries. JSON is better than XML in many ways. It&#8217;s easier for people to read, more straightforward, and takes up less space. It&#8217;s excellent for storing and sending information between web applications and servers on the internet.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JSON version<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>{\r\n\t\"Employees\": &#91;\r\n    {\r\n\t\"name\": \"John Doe\",\r\n\t\"department\": \"Engineering\",\r\n\t\"country\": \"USA\"\r\n\t\t},\r\n\r\n\t\t{\r\n\t\t\"name\": \"Kate Kateson\",\r\n\t\t\"department\": \"IT support\",\r\n\t\t\"country\": \"United Kingdom\"\r\n\t\t}\r\n\t]\r\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">JSON Data Types and Examples<\/h2>\n\n\n\n<p>JSON can be used in JavaScript programs without any need for parsing or serializing. It\u2019s a text-based way of representing JavaScript object literals, arrays, and scalar data.<\/p>\n\n\n\n<p>JSON is relatively easy to read and write while also easy for software to parse and generate. It\u2019s often used for serializing structured data and exchanging it over a network, typically between a server and web applications.<br>At the granular level, JSON consists of data types.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Array<\/li>\n\n\n\n<li>Boolean<\/li>\n\n\n\n<li>Null<\/li>\n\n\n\n<li>Number<\/li>\n\n\n\n<li>Object<\/li>\n\n\n\n<li>String<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Array<\/h2>\n\n\n\n<p>An array data type is an ordered collection of values. In JSON, array values must be of type string, number, object, array, Boolean, or null.<br><strong><strong>Example<\/strong><\/strong> <strong>:-<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\r\n\r\n\"Influencers\" :   &#91; \r\n{\r\n \"name\" : \"Jaxon\", \r\n \"age\" : 42, \r\n \"Works At\" : \"Tech News\"\r\n}\r\n\r\n{\r\n \"name\" : \"Miller\", \r\n \"age\" : 35\r\n \"Works At\" : \"IT Day\"\r\n}\r\n\r\n] \r\n}\n<strong>Boolean\n<\/strong>Boolean values are designated as either true or false. Boolean values aren\u2019t surrounded by quotes and are treated as string values.\n<strong>\nExample<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>{ \"AllowPartialShipment\" : false }\n<strong>\nNull<\/strong>\nNull is an empty value. When no value is assigned to a key, it can be treated as null.\n<strong>Example :-<\/strong>\n{ \"Special Instructions\" : null }\n\n<strong>Number<\/strong>\nA JSON number follow JavaScript\u2019s double-precision floating-point format.\n\n<strong>Example<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"number_1\" : 210,\n  \"number_2\" : 215,\n  \"number_3\" : 21.05,\n  \"number_4\" : 10.05\n}\n<strong>Object<\/strong>\n\nA JSON object data type is a set of name or value pairs inserted between {} (curly braces). The keys must be strings and separated by a comma and should be unique.\n\n<strong>Example<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"Influencer\" :   { \"name\" : \"Jaxon\" ,  \"age\" : \"42\" ,  \"city\" ,  \"New York\" }\n}\n\n<strong>String<\/strong>\nA string in JSON is composed of Unicode characters, with backslash (\\) escaping.\n\n<strong>Example<\/strong>\n\n{ \"name\" : \"Jones\" }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>YAML is a way to organize and store data in a format that&#8217;s easy for both humans and computers to read. It&#8217;s commonly used for creating configuration files. Some say YAML stands for &#8220;yet another markup language,&#8221; highlighting its purpose for data, not documents. YAML is liked in programming because it&#8217;s simple to read and &#8230; <a title=\"What is Yaml?\" class=\"read-more\" href=\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/\" aria-label=\"Read more about What is Yaml?\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-116","post","type-post","status-publish","format-standard","hentry","category-what-is-yaml"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is Yaml? - XOps Tutorials!!!<\/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.xopsschool.com\/tutorials\/what-is-yaml\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Yaml? - XOps Tutorials!!!\" \/>\n<meta property=\"og:description\" content=\"YAML is a way to organize and store data in a format that&#8217;s easy for both humans and computers to read. It&#8217;s commonly used for creating configuration files. Some say YAML stands for &#8220;yet another markup language,&#8221; highlighting its purpose for data, not documents. YAML is liked in programming because it&#8217;s simple to read and ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/\" \/>\n<meta property=\"og:site_name\" content=\"XOps Tutorials!!!\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-13T15:53:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-29T18:22:31+00:00\" \/>\n<meta name=\"author\" content=\"ritik hansda\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ritik hansda\" \/>\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.xopsschool.com\/tutorials\/what-is-yaml\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/\"},\"author\":{\"name\":\"ritik hansda\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7\"},\"headline\":\"What is Yaml?\",\"datePublished\":\"2024-02-13T15:53:48+00:00\",\"dateModified\":\"2024-02-29T18:22:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/\"},\"wordCount\":349,\"commentCount\":0,\"articleSection\":[\"What is yaml?\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/\",\"name\":\"What is Yaml? - XOps Tutorials!!!\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\"},\"datePublished\":\"2024-02-13T15:53:48+00:00\",\"dateModified\":\"2024-02-29T18:22:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.xopsschool.com\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is Yaml?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/\",\"name\":\"XOps Tutorials!!!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7\",\"name\":\"ritik hansda\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g\",\"caption\":\"ritik hansda\"},\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/author\/ritikhansda\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Yaml? - XOps Tutorials!!!","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.xopsschool.com\/tutorials\/what-is-yaml\/","og_locale":"en_US","og_type":"article","og_title":"What is Yaml? - XOps Tutorials!!!","og_description":"YAML is a way to organize and store data in a format that&#8217;s easy for both humans and computers to read. It&#8217;s commonly used for creating configuration files. Some say YAML stands for &#8220;yet another markup language,&#8221; highlighting its purpose for data, not documents. YAML is liked in programming because it&#8217;s simple to read and ... Read more","og_url":"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/","og_site_name":"XOps Tutorials!!!","article_published_time":"2024-02-13T15:53:48+00:00","article_modified_time":"2024-02-29T18:22:31+00:00","author":"ritik hansda","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ritik hansda","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/#article","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/"},"author":{"name":"ritik hansda","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7"},"headline":"What is Yaml?","datePublished":"2024-02-13T15:53:48+00:00","dateModified":"2024-02-29T18:22:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/"},"wordCount":349,"commentCount":0,"articleSection":["What is yaml?"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/","url":"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/","name":"What is Yaml? - XOps Tutorials!!!","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#website"},"datePublished":"2024-02-13T15:53:48+00:00","dateModified":"2024-02-29T18:22:31+00:00","author":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7"},"breadcrumb":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-yaml\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.xopsschool.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"What is Yaml?"}]},{"@type":"WebSite","@id":"https:\/\/www.xopsschool.com\/tutorials\/#website","url":"https:\/\/www.xopsschool.com\/tutorials\/","name":"XOps Tutorials!!!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7","name":"ritik hansda","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g","caption":"ritik hansda"},"url":"https:\/\/www.xopsschool.com\/tutorials\/author\/ritikhansda\/"}]}},"_links":{"self":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":2,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":204,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/116\/revisions\/204"}],"wp:attachment":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}