{"id":19586,"date":"2024-01-15T01:50:07","date_gmt":"2024-01-15T01:50:07","guid":{"rendered":"https:\/\/www.softwaretestinghelp.com\/?p=19586"},"modified":"2025-05-09T10:56:48","modified_gmt":"2025-05-09T10:56:48","slug":"json-tutorial","status":"publish","type":"post","link":"https:\/\/www.softwaretestinghelp.com\/json-tutorial\/","title":{"rendered":"JSON Tutorial For Beginners Step-By-Step"},"content":{"rendered":"\n<p><strong>Introduction to JSON: A Complete JSON Tutorial Series for Beginners<\/strong><\/p>\n\n\n\n<p><strong>J<\/strong>ava<strong>S<\/strong>cript <strong>O<\/strong>bject <strong>Notion,<\/strong> commonly known as <strong>JSON,<\/strong> is one of the most popular data transition formats. It is a text-based and lightweight format for data transactions. The JSON format was first computed by Douglas Crockford.<\/p>\n\n\n\n<p>This being a text-based format is easier to read or write by the user and at the same time, its lightweight property makes it a stress-free alternative for machines to deconstruct or generate. It is basically a subset of the JavaScript but JSON, as a text format is totally independent of any of the programming languages used as almost all the languages, can easily analyze the text.<\/p>\n\n\n\n<p>Its unique properties like text-based, lightweight, language independence etc. make it an ideal candidate for data-interchange operations.<\/p>\n\n\n\n<p><strong>LIST of JSON Tutorials in this series:<\/strong><\/p>\n\n\n\n<p><span style=\"color: #ff6600;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Tutorial #1:<\/mark><\/strong><\/span> <a href=\"https:\/\/www.softwaretestinghelp.com\/json-tutorial\/\">Introduction to JSON<\/a> (This Tutorial)<br><span style=\"color: #ff6600;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Tutorial #2:<\/mark><\/strong><\/span> <a href=\"https:\/\/www.softwaretestinghelp.com\/create-json-objects-using-c\/\">Creating JSON Objects Using C#<\/a><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\"><span style=\"color: #ff6600;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Tutorial #3:<\/mark><\/strong><\/span><\/mark> <a href=\"https:\/\/www.softwaretestinghelp.com\/create-json-structure-using-c\/\">Creating JSON Structure Using C#<\/a><br><span style=\"color: #ff6600;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Tutorial #4:<\/mark><\/strong> <\/span><a href=\"https:\/\/www.softwaretestinghelp.com\/json-for-interface-testing\/\">Using JSON for Interface Testing<\/a><br><span style=\"color: #ff6600;\"><strong><span style=\"color: #ff6600;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Tutorial #5:<\/mark><\/strong><\/span><\/strong> <\/span><a href=\"https:\/\/www.softwaretestinghelp.com\/top-json-interview-questions\/\">JSON Interview Questions<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">JSON Tutorial for Beginners<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/JSON-INTRODUCTION.jpg\"><img decoding=\"async\" width=\"600\" height=\"382\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/JSON-INTRODUCTION.jpg\" alt=\"JSON Tutorial\" class=\"wp-image-19878\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/JSON-INTRODUCTION.jpg 600w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/JSON-INTRODUCTION-300x191.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/figure>\n\n\n\n<p><em><strong>This tutorial gives you a complete overview of JSON, thereby briefing about its objects, properties, usage, <\/strong><strong>and arrays with<\/strong><strong> some examples for your easy and better understanding.<\/strong><\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Usage of JSON<\/h2>\n\n\n\n<p>JSON is mostly used to transfer data from one system to another. It can transfer data between two computers, databases, programs etc.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It is mainly used for transmitting serialized data over the network connection.<\/li>\n\n\n\n<li>It can be used with all the major programming languages.<\/li>\n\n\n\n<li>Useful in data transition from the web application to the server.<\/li>\n\n\n\n<li>Most web services use a JSON based format for data transfer.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Properties of JSON<\/h2>\n\n\n\n<p><strong><span style=\"color: #ff9900;\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Let\u2019s summarize the properties:<\/mark><\/span><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It is a text-based lightweight data interchange format.<\/li>\n\n\n\n<li>It has been extended from the JavaScript language.<\/li>\n\n\n\n<li>The extension is <strong>.json.<\/strong><\/li>\n\n\n\n<li>Being a text-based format it is easy to read and write by both the user\/programmer and the machines.<\/li>\n\n\n\n<li>This is independent of programming language but it also uses the conventions that are quite well known within the C-Family of languages like C, C++, C#, JavaScript, Java, Python, Perl etc.<\/li>\n<\/ul>\n\n\n\n<p>So far, we have discussed JSON properties and usage. From here on, we will discuss the structure of JSON or <strong>J<\/strong>ava<strong>S<\/strong>cript <strong>O<\/strong>bject <strong>N<\/strong>otion.<\/p>\n\n\n\n<p>JSON grew out of a need for a real-time server-to-browser communication procedure that can operate without using any extra plugins like java applets or flash. So, after realizing the need for a communication protocol that can be used in real-time, Douglas Crockford specified JSON in early 2000.<\/p>\n\n\n\n<p>Earlier JSON was viewed as the subcategory of JavaScript and was vividly used with the same. But the code for serializing and parsing JSON is available in almost all the major languages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Syntax of JSON<\/h2>\n\n\n\n<p>By now, you must have gained some basic knowledge about JSON. Let&#8217;s take a look at the basic syntax which is used in forming a JSON.<\/p>\n\n\n\n<p>JSON can be basically classified by being built on two structural entities. They are a collection of name-value pairs and an ordered list of values.<\/p>\n\n\n\n<p>JSON is a universal data structure as most of the programming languages available today support them. It makes the work of a programmer a lot easier to have an interchangeable data type that can work across different languages.<\/p>\n\n\n\n<p><span style=\"color: #ff9900;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Learn more about these data types:<\/mark><\/strong><\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The name value pair collection is realized as an object, strut, record, dictionary etc.<\/li>\n\n\n\n<li>The ordered value list is realized as an array, list etc.<\/li>\n<\/ul>\n\n\n\n<p>We have seen almost all the basic theories until now. Let\u2019s move on and have a look at the basic JSON structure. In this <em><span style=\"text-decoration: underline;\">Example<\/span><\/em>, we are considering a JSON representing the details of a Car.<\/p>\n\n\n\n<p><span style=\"color: #000000;\"><strong>Let\u2019s assume we have a car object with the following basic properties and their attributes:<\/strong><\/span><\/p>\n\n\n\n<p><span style=\"color: #993300;\"><em>Make and Mode = Maruti Suzuki Swift<\/em><\/span><br><span style=\"color: #993300;\"><em>Make Year = 2017<\/em><\/span><br><span style=\"color: #993300;\"><em>Color = Red<\/em><\/span><br><span style=\"color: #993300;\"><em>Type = Hatchback<\/em><\/span><\/p>\n\n\n\n<p>So, if we want to transfer this data using a JSON file, then the serialization of this data will create a JSON.<\/p>\n\n\n\n<p><span style=\"color: #ff9900;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">JSON will look something like this:<\/mark><\/strong><\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Serizational-of-Data.jpg\"><img decoding=\"async\" width=\"382\" height=\"105\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Serizational-of-Data.jpg\" alt=\"Serialization of Data\" class=\"wp-image-19645\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Serizational-of-Data.jpg 382w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Serizational-of-Data-300x82.jpg 300w\" sizes=\"(max-width: 382px) 100vw, 382px\" \/><\/a><\/figure>\n\n\n\n<p>We have seen about the usage of JSON, its basic structure and how data is presented in the JSON format. Now, let&#8217;s take a closer look at how different elements are structured in JSON.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a JSON Object?<\/h2>\n\n\n\n<p>A JSON object is a set of Keys along with its values without any specific order.<\/p>\n\n\n\n<p>The key and their values are grouped using curly braces, both opening and closing \u201c{ }\u201d. So, in the previous <span style=\"text-decoration: underline;\"><em>Example<\/em> <\/span>when we were creating a JSON with a car attribute, we were creating a JSON car Object. There are certain rules that need to be followed while creating a JSON structure, we will learn about those rules while discussing the Key value pairs.<\/p>\n\n\n\n<p>So, in order to create a JSON, the first thing we will need is an attribute. Here, we are creating an \u201cEmployee\u201d JSON object. The next thing we need is to specify the properties of the object. Let&#8217;s assume our employees have a \u201cFirst Name\u201d, \u201cLast Name\u201d, \u201cemployee ID\u201d and \u201cdesignation\u201d. These properties of the employee are represented as \u201cKeys\u201d in the JSON structure.<\/p>\n\n\n\n<p><span style=\"color: #ff9900;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Let\u2019s create a JSON object:<\/mark><\/strong><\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/JSON-object.jpg\"><img decoding=\"async\" width=\"354\" height=\"108\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/JSON-object.jpg\" alt=\"JSON object\" class=\"wp-image-19643\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/JSON-object.jpg 354w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/JSON-object-300x92.jpg 300w\" sizes=\"(max-width: 354px) 100vw, 354px\" \/><\/a><\/figure>\n\n\n\n<p>Everything within the curly braces is known as <em><strong>the JSON Employee Object<\/strong><\/em>.<\/p>\n\n\n\n<p>A basic JSON object is represented by a Key-Value pair. In the previous <em><span style=\"text-decoration: underline;\">Example<\/span><\/em>, we used JSON to represent employee data.<\/p>\n\n\n\n<p>And we have represented different properties for the employee; \u201cFirst Name\u201d, \u201cLast Name\u201d, \u201cemployee ID\u201d and \u201cdesignation\u201d. Each of these \u201ckeys\u201d has a value in the JSON. For Example, \u201cFirst Name\u201d has been represented by a value \u201c<em>Sam<\/em>\u201d. Similarly, we also have represented other keys by using different values.<\/p>\n\n\n\n<p><span style=\"color: #ff9900;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Generic Rules to be followed while creating a JSON:<\/mark><\/strong><\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>JSON Objects should start and end with braces \u201c{ }\u201d.<\/li>\n\n\n\n<li>Key fields are included in the double quotes.<\/li>\n\n\n\n<li>Values are represented by putting \u201c:\u201d colon between them and the keys.<\/li>\n\n\n\n<li>The JSON key-value pairs are separated by a comma \u201c,\u201d.<\/li>\n\n\n\n<li>Values can be of any data type like String, Integer, Boolean etc.<\/li>\n<\/ul>\n\n\n\n<p><span style=\"color: #ff9900;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">A small exercise for you.<\/mark><\/strong><\/span><\/p>\n\n\n\n<p><strong>Try to create a sample JSON describing an \u201cEmployee\u201d with your own set of Keys and Values.<\/strong><\/p>\n\n\n\n<p>By now, you must have had a basic understanding of what JSON is. Usage of JSON and How it Looks? Now, let&#8217;s dive deeper into more complex JSON structures.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">JSON Arrays<\/h2>\n\n\n\n<p>Arrays in JSON are similar to the ones that are present in any programming language, the array in JSON is also an ordered collection of data. The array starts with a left square bracket \u201c[\u201cand ends with a right square bracket \u201c]\u201d. The values inside the array are separated by a comma. Some basic rules need to be followed if you are going to use an array in a JSON.<\/p>\n\n\n\n<p>Let\u2019s have a look at a sample JSON with an Array. We will use the same Employee object that we used earlier. We will add another property like \u201cLanguage expertise\u201d. An employee can have expertise in multiple programming languages. In this case, we can use an array to offer a better way to record multiple language expertise values.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Examples-of-JSON.jpg\"><img decoding=\"async\" width=\"442\" height=\"123\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Examples-of-JSON.jpg\" alt=\"Examples of JSON\" class=\"wp-image-19641\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Examples-of-JSON.jpg 442w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Examples-of-JSON-300x83.jpg 300w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/a><\/figure>\n\n\n\n<p>As we have already discussed, there are also a few rules that need to be followed, while including an array in a JSON.<\/p>\n\n\n\n<p><strong><span style=\"color: #ff9900;\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">They are:<\/mark><\/span><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The array in JSON will start with a left square bracket and will end with a right square bracket.<\/li>\n\n\n\n<li>Values inside the array will be separated by a comma.<\/li>\n<\/ul>\n\n\n\n<p>Objects, Key-value pairs, and Arrays make different components of the JSON. These can be used together to record any data in a JSON.<\/p>\n\n\n\n<p>Now, as we have already discussed the basic structure of JSON, let&#8217;s start working on a more complex JSON structure.<\/p>\n\n\n\n<p>Earlier in this tutorial, we gave you two Examples of JSON as shown below.<\/p>\n\n\n\n<p><span style=\"color: #ff9900;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Employee JSON<\/mark><\/strong><\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Examples-of-JSON.jpg\"><img decoding=\"async\" width=\"442\" height=\"123\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Examples-of-JSON.jpg\" alt=\"Examples of JSON\" class=\"wp-image-19641\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Examples-of-JSON.jpg 442w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Examples-of-JSON-300x83.jpg 300w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/a><\/figure>\n\n\n\n<p><span style=\"color: #ff9900;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Car JSON<\/mark><\/strong><\/span><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Car-JSON.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-19640\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Car-JSON.jpg\" alt=\"Car JSON\" width=\"388\" height=\"116\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Car-JSON.jpg 388w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Car-JSON-300x90.jpg 300w\" sizes=\"(max-width: 388px) 100vw, 388px\" \/><\/a><br><\/strong>Now, let\u2019s assume that there is more than 1 employee and they also have a car. We will have to arrange the data in such a way that the car JSON should also be included in the Employee JSON to make the record a complete one. This means that we will have to create a nested Car JSON object inside the Employee JSON.<\/p>\n\n\n\n<p>In order to include the car in the Employee JSON, initially, we need to include a Key as \u201ccar\u201d in the JSON.<\/p>\n\n\n\n<p><strong><span style=\"color: #ff9900;\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Something like this:<\/mark><\/span><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Including-Car-in-Employee-JSON.jpg\"><img decoding=\"async\" width=\"401\" height=\"138\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Including-Car-in-Employee-JSON.jpg\" alt=\"Including Car in Employee JSON\" class=\"wp-image-19642\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Including-Car-in-Employee-JSON.jpg 401w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Including-Car-in-Employee-JSON-300x103.jpg 300w\" sizes=\"(max-width: 401px) 100vw, 401px\" \/><\/a><\/figure>\n\n\n\n<p>Once we have added the car key to the employee JSON, we can then pass the value directly to the Car JSON.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n\"FirstName\": \"Sam\",\n\"LastName\": \u201cJackson\u201d,\n\"employeeID\": 5698523,\n\"Designation\" : \"Manager\",\n\u201cLanguageExpertise\u201d : [\u201cJava\u201d, \u201cC#\u201d, \u201cPython\u201d]\n\n\u201cCar\u201d : \n{\n\"Make&amp;Model\": \"Maruti Suzuki Swift\",\n\"MakeYear\": 2017,\n\"Color\": \u201cRed\u201d,\n\"Type\u201d: \"Hatchback\",\n}\n}\n\n\n<\/pre>\n\n\n\n<p>This way, we can create a Nested JSON.<\/p>\n\n\n\n<p>Let&#8217;s assume a situation where there are multiple employees, so we will have to create a JSON that can hold the data for several employees.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n\"FirstName\": \"Sam\",\n\"LastName\": \"Jackson\",\n\"employeeI-D\": 5698523,\n\"Designation\": \"Manager\",\n\"LanguageExpertise\": [\"Java\", \"C#\", \"Python\"],\n\"Car\": {\n\"Make&amp;Model\": \"Maruti Suzuki Swift\",\n\"MakeYear\": 2017,\n\"Color\": \"Red\",\n\"Type\": \"Hatchback\"\n}\n\n},\n{\n\"FirstName\": \"Tam\",\n\"LastName\": \"Richard\",\n\"employeeID\": 896586,\n\"Designation\": \"Senior Manager\",\n\"LanguageExpertise\": [\"Ruby\", \"C#\"],\n\"Car\": {\n\"Make&amp;Model\": \"Hyundai Verna\",\n\"MakeYear\": 2015,\n\"Color\": \"Black\",\n\"Type\": \"Sedan\"\n}\n}\n<\/pre>\n\n\n\n<p>In the above <em><span style=\"text-decoration: underline;\">Example<\/span><\/em>, you can clearly see that we have included the data for two employees. Again, there are a few considerations while creating this kind of complex JSON structure. First, remember to include all the JSON structure inside a square bracket \u201c[ ]\u201d. A comma is used to separate the two different sets of data in a JSON, whether it\u2019s a key-value pair or a JSON object.<\/p>\n\n\n\n<p><span style=\"color: #000000;\"><em>As we get to the end of the tutorial, here is a little exercise for you all.<\/em><\/span><\/p>\n\n\n\n<p><strong>Create a company JSON with different key values. <\/strong><\/p>\n\n\n\n<p><span style=\"color: #ff9900;\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-contrast-color\">Given below are the steps you will need to follow:<\/mark><\/strong><\/span><\/p>\n\n\n\n<p><strong>#1)<\/strong> Open a notepad or any text editor.<\/p>\n\n\n\n<p><strong>#2)<\/strong> Create a company JSON with different key-value pairs.<\/p>\n\n\n\n<p><strong>#3)<\/strong> Add data for at least two companies.<\/p>\n\n\n\n<p><strong>#4)<\/strong> Include an array field in the JSON.<\/p>\n\n\n\n<p><strong>#5)<\/strong> Use a nested JSON.<\/p>\n\n\n\n<p><strong>#6)<\/strong> Now navigate JSON <a href=\"https:\/\/jsonlint.com\/\" target=\"_blank\" rel=\"noopener nofollow\">Validator<\/a>.<\/p>\n\n\n\n<p><strong>#7)<\/strong> Paste your JSON structure inside the text area and click on validate to validate your JSON.<\/p>\n\n\n\n<p>Make sure you follow all the above procedures and rules while creating a JSON. Here is the validation of the employee JSON that we created earlier using JSON Validator.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Validating-JSON.jpg\"><img decoding=\"async\" width=\"485\" height=\"535\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Validating-JSON.jpg\" alt=\"Validating JSON\" class=\"wp-image-19870\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Validating-JSON.jpg 485w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2017\/12\/Validating-JSON-272x300.jpg 272w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>JSON is one of the most popular data transition formats. It is mostly used for data transition between different networks. The text-based structure means that JSON can be read and deconstructed into individual data easily either by a user or by any machine.<\/p>\n\n\n\n<p>JSON though sometimes being described as the subclass of JavaScript, can be read\/modified by any programming language. JSON files have an extension of .json and can be created using any programming language.<\/p>\n\n\n\n<p>You can create a simple JSON by directly assigning key-value pairs or using arrays to assign multiple values to a key. Other than the simple structure, JSON can also have a nested structure, which means a JSON can have another JSON object described inside it as a key. This allows the user to transmit more complex data through the format.<\/p>\n\n\n\n<p><em><strong>Please let us know if you have any queries or if you need more clarification.<\/strong><\/em><\/p>\n\n\n\n<p><strong><span style=\"text-decoration: underline; color: #ff6600;\">Next&nbsp;Tutorial #2<\/span>: <a href=\"https:\/\/www.softwaretestinghelp.com\/create-json-objects-using-c\/\">Creating JSON Objects Using C# (Part 1)<\/a><\/strong><\/p>\n\r\n\t\t\t<div id=\"daexthefup-container\"\r\n\t\t\t\tclass=\"daexthefup-container daexthefup-layout-stacked daexthefup-alignment-center\"\r\n\t\t\t\tdata-post-id=\"19586\">\r\n\r\n\t\t\t\t<div class=\"daexthefup-feedback\">\r\n\t\t\t\t\t<div class=\"daexthefup-text\">\r\n\t\t\t\t\t\t<h3 class=\"daexthefup-title\">Was this helpful?<\/h3>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"daexthefup-buttons-container\">\r\n\t\t\t\t\t\t<div class=\"daexthefup-buttons\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefup-yes daexthefup-button daexthefup-button-type-icon\" data-value=\"1\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.thumb-up-cls-1{fill:#c9c9c9;}.thumb-up-cls-2{fill:#e1e1e1;}.thumb-up-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"thumb_up\">\r\n                        <path class=\"thumb-up-cls-2 daexthefup-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <g>\r\n                            <rect class=\"thumb-up-cls-3 daexthefup-icon-secondary-color\" x=\"10\" y=\"20\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\r\n                            <path class=\"thumb-up-cls-1 daexthefup-icon-primary-color\" d=\"m30.57,9.06l-.49-.1c-.81-.17-1.61.35-1.78,1.16l-5.3,11.74c-.17.81,3.16,1.61,3.97,1.78l1.96.41c.81.17,1.61-.35,1.78-1.16l2.18-10.27c.34-1.61-.7-3.21-2.31-3.56Z\" \/>\r\n                            <path class=\"thumb-up-cls-1 daexthefup-icon-primary-color\" d=\"m38.17,20h-18.67c-.83,0-1.5.67-1.5,1.5v12c0,.83.67,1.5,1.5,1.5h16.27c.71,0,1.33-.5,1.47-1.21l2.4-12c.19-.93-.53-1.8-1.47-1.8Z\" \/>\r\n                        <\/g>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefup-no daexthefup-button daexthefup-button-type-icon\" data-value=\"0\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.thumb-down-cls-1{fill:#c9c9c9;}.thumb-down-cls-2{fill:#e1e1e1;}.thumb-down-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"thumb_down\">\r\n                        <path class=\"thumb-down-cls-2 daexthefup-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <g>\r\n                            <rect class=\"thumb-down-cls-3 daexthefup-icon-secondary-color\" x=\"10\" y=\"13\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\r\n                            <path class=\"thumb-down-cls-1 daexthefup-icon-primary-color\" d=\"m30.57,38.94l-.49.1c-.81.17-1.61-.35-1.78-1.16l-5.3-11.74c-.17-.81,3.16-1.61,3.97-1.78l1.96-.41c.81-.17,1.61.35,1.78,1.16l2.18,10.27c.34,1.61-.7,3.21-2.31,3.56Z\" \/>\r\n                            <path class=\"thumb-down-cls-1 daexthefup-icon-primary-color\" d=\"m38.17,28h-18.67c-.83,0-1.5-.67-1.5-1.5v-12c0-.83.67-1.5,1.5-1.5h16.27c.71,0,1.33.5,1.47,1.21l2.4,12c.19.93-.53,1.8-1.47,1.8Z\" \/>\r\n                        <\/g>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefup-comment\">\r\n\t\t\t\t\t<div class=\"daexthefup-comment-top-container\">\r\n\t\t\t\t\t\t<label id=\"daexthefup-comment-label\" class=\"daexthefup-comment-label\"><\/label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"daexthefup-comment-character-counter-container\">\r\n\t\t\t\t\t\t\t\t<div id=\"daexthefup-comment-character-counter-number\"\r\n\t\t\t\t\t\t\t\t\tclass=\"daexthefup-comment-character-counter-number\"><\/div>\r\n\t\t\t\t\t\t\t\t<div class=\"daexthefup-comment-character-counter-text\"><\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<textarea id=\"daexthefup-comment-textarea\" class=\"daexthefup-comment-textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Type your message\"\r\n\t\t\t\t\t\t\t\tmaxlength=\"\r\n\t\t\t\t\t\t\t\t400\t\t\t\t\t\t\t\t\t\"><\/textarea>\r\n\t\t\t\t\t<div class=\"daexthefup-comment-buttons-container\">\r\n\t\t\t\t\t\t<button class=\"daexthefup-comment-submit daexthefup-button\">Submit<\/button>\r\n\t\t\t\t\t\t<button class=\"daexthefup-comment-cancel daexthefup-button\">Cancel<\/button>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefup-successful-submission-text\">Thanks for your feedback!<\/div>\r\n\r\n\t\t\t<\/div>\r\n\r\n\t\t\t","protected":false},"excerpt":{"rendered":"<p>Introduction to JSON: A Complete JSON Tutorial Series for Beginners JavaScript Object Notion, commonly known as JSON, is one of the most popular data transition formats. It is a text-based and lightweight format for data transactions. The JSON format was first computed by Douglas Crockford. This being a text-based format &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"JSON Tutorial For Beginners Step-By-Step\" class=\"read-more button\" href=\"https:\/\/www.softwaretestinghelp.com\/json-tutorial\/#more-19586\" aria-label=\"Read more about JSON Tutorial For Beginners Step-By-Step\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":19878,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_helpful_pro_status":1,"footnotes":""},"categories":[521],"tags":[],"class_list":["post-19586","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/posts\/19586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/comments?post=19586"}],"version-history":[{"count":0,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/posts\/19586\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media\/19878"}],"wp:attachment":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media?parent=19586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/categories?post=19586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/tags?post=19586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}