

{"id":77758,"date":"2020-05-08T17:39:09","date_gmt":"2020-05-08T12:09:09","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=77758"},"modified":"2021-08-25T13:56:18","modified_gmt":"2021-08-25T08:26:18","slug":"json-parsing-in-android","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/","title":{"rendered":"JSON Parsing in Android &#8211; Step by Step Implementation"},"content":{"rendered":"<p>In this <strong>DataFlair Android tutorial<\/strong>, we\u2019re going to cover the <strong>JSON parsing in Android<\/strong>. Before getting into that, first, know what JSON is.<\/p>\n<p>JSON stands for JavaScript Object Notation. It is a format for data exchange and storage. When compared to XML, it is very simple and easy to parse information interchange format. JSON is extensively used for data exchange between the device and server in android applications. In this tutorial, we\u2019ll implement JSON parsing with a simple example.<\/p>\n<p>When we talk about JSON, it is a lightweight data-interchange format that is language independent. Though it uses the syntax of JavaScript, it is limited to text.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-77776\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android.jpg\" alt=\"JSON Parsing in android\" width=\"802\" height=\"420\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android.jpg 802w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android-520x272.jpg 520w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/a><\/p>\n<h2>JSON Structures in Android<\/h2>\n<p>JSON uses two types of brackets that are as follows:<\/p>\n<ul>\n<li>[] &#8211; To declare the elements of Array in JSON, they\u2019re written in square brackets.<\/li>\n<li>{} &#8211; To create JSON objects, the elements are written in curly brackets.<\/li>\n<\/ul>\n<p>JSON has the following types of structures that are:<\/p>\n<p><strong>1. JSON Objects<\/strong><\/p>\n<p>The elements inside the curly brackets are known as Objects.<\/p>\n<p><strong>2. JSON Array<\/strong><\/p>\n<p>A list of values, known as Arrays.<\/p>\n<p><strong>3. JSON Key-Value<\/strong><\/p>\n<p>This data is stored as a pair of keys and values. Here the keys can be a name, a number for which the values can be Seema, 98767586 etc.<\/p>\n<h2>Why JSON Parsing in Android over XML?<\/h2>\n<p>Let us see some reasons for why to choose JSON over XML:<\/p>\n<ul>\n<li>It is much easier and quicker with high performance<\/li>\n<li>It can use arrays<\/li>\n<li>Its libraries do not depend on other libraries<\/li>\n<li>The codes written in JSON are short, clean and easy to understand<\/li>\n<li>It is free to open use and open-source tool<\/li>\n<li>In JSON value retrieval is easy<\/li>\n<li>It has a fully automated way of serializing\/deserializing JavaScript.<\/li>\n<li>It is supported by many Ajax toolkits and most of the backend technologies.<\/li>\n<\/ul>\n<h2>Examples of XML and JSON<\/h2>\n<p>Let us see the code difference of JSON and XML files:<\/p>\n<p><strong>XML Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;?xml version= \u201c1.0\u201d encoding= \u201c\u201d ?&gt;\r\n&lt;student&gt;\r\n        &lt;student&gt;\r\n  &lt;name&gt; Sia Sharma&lt;\/name&gt;\r\n  &lt;city&gt; Chandigarh&lt;\/city&gt;\r\n \t      &lt;\/student&gt;\r\n        &lt;student&gt;\r\n  &lt;name&gt;Dimple D\u2019souza&lt;\/name&gt;\r\n  &lt;city&gt; Nagpur&lt;\/city&gt;\r\n \t      &lt;\/student&gt;\r\n      &lt;student&gt;\r\n  &lt;name&gt;Anna Jones&lt;\/name&gt;\r\n  &lt;city&gt; Mumbai&lt;\/city&gt;\r\n \t      &lt;\/student&gt;\r\n\r\n  &lt;\/student&gt;<\/pre>\n<p><b>JSON Example:<\/b><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">{ \u201cstudents\u201d: [\r\n{ \u201cname\u201d: \u201cSia Sharma\u201d, \u201ccity\u201d: \u201cChandigarh\u201d},\r\n{ \u201cname\u201d: \u201cPrachi D\u2019Souza\u201d, \u201ccity\u201d: \u201cNagpur\u201d},\r\n{ \u201cname\u201d: \u201cAnnas Jones\u201d, \u201ccity\u201d: \u201cMumbai\u201d}\r\n]}<\/pre>\n<p>I hope the difference is all clear in front of you. This is how simple JSON is and how easily it could be understood.<\/p>\n<h2>JSON Parsing Functions in Android<\/h2>\n<p>Here are functions which we need for JSON parsing:<\/p>\n<p><strong>1. get(int index)<\/strong><\/p>\n<p>This function gets the value of the object type present in the JSON array.<\/p>\n<p><strong>2. getType(int index)<\/strong><\/p>\n<p>Here Type can be Int, Double, Boolean, Long, String, JSONArray, or JSONObject. This function gets the value of any of the mentioned types present in the JSON array.<\/p>\n<p><strong>3. length()<\/strong><\/p>\n<p>using this function, we get the length of the array that has come from the server.<\/p>\n<p><strong>4. opt(int index)<\/strong><\/p>\n<p>This function returns the Object Type value in the JSONArray at a particular index.<\/p>\n<p><strong>5. optType(int index )<\/strong><\/p>\n<p>Here Type can be Int, Double, Boolean, Long, String, JSONArray, or JSONObject. This function returns the value of the mentioned types in the JSONArray at a particular index.<\/p>\n<h2>JSON Implementation in Android<\/h2>\n<p>Now we\u2019ll implement it using the following steps;<\/p>\n<p>1. First of all, we will create a new project and name it<br \/>\n2. Then write the following in the activity_main.xml file:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n   android:layout_width=\"fill_parent\"\r\n   android:layout_height=\"fill_parent\"\r\n   android:orientation=\"vertical\"&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/textView\"\r\n       android:layout_width=\"wrap_content\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginLeft=\"90dp\"\r\n       android:layout_marginTop=\"30dp\"\r\n       android:text=\"DataFlair \"\r\n       android:textColor=\"#00574B\"\r\n       android:textSize=\"50dp\"\r\n       android:textStyle=\"bold\" \/&gt;\r\n\r\n   &lt;ListView\r\n       android:id=\"@+id\/students\"\r\n       android:layout_width=\"fill_parent\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:dividerHeight=\"1dp\" \/&gt;\r\n&lt;\/LinearLayout&gt;<\/pre>\n<p>3.\u00a0Next, create a new layout and name it as list.xml. And write the following code in it:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;RelativeLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n   android:layout_width=\"fill_parent\"\r\n   android:layout_height=\"wrap_content\"\r\n   android:orientation=\"horizontal\"\r\n   android:padding=\"5dip\"&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/StudentName\"\r\n       android:layout_width=\"wrap_content\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:textColor=\"#024E46\"\r\n       android:textSize=\"25dp\"\r\n       android:textStyle=\"bold\" \/&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/Branch\"\r\n       android:layout_width=\"wrap_content\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_below=\"@id\/StudentName\"\r\n       android:layout_marginTop=\"10dp\"\r\n       android:textColor=\"#A5BAB8\"\r\n       android:textSize=\"20dp\" \/&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/institute\"\r\n       android:layout_width=\"wrap_content\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_alignParentRight=\"true\"\r\n       android:textColor=\"#A5BAB8\"\r\n       android:textSize=\"20dp\" \/&gt;\r\n&lt;\/RelativeLayout&gt;<\/pre>\n<p>4.\u00a0Now write the following code in the MainActivity.java file:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">package com.dataflair.myjsonparsing;\r\n\r\nimport android.os.Bundle;\r\nimport android.util.Log;\r\nimport android.widget.ListAdapter;\r\nimport android.widget.ListView;\r\nimport android.widget.SimpleAdapter;\r\n\r\nimport androidx.appcompat.app.AppCompatActivity;\r\n\r\nimport org.json.JSONArray;\r\nimport org.json.JSONException;\r\nimport org.json.JSONObject;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.HashMap;\r\n\r\npublic class MainActivity extends AppCompatActivity {\r\n\r\n   @Override\r\n   protected void onCreate(Bundle savedInstanceState) {\r\n       super.onCreate(savedInstanceState);\r\n       setContentView(R.layout.activity_main);\r\n       String json_stu = getListData();\r\n       try {\r\n           ArrayList&lt;HashMap&lt;String, String&gt;&gt; userList = new ArrayList&lt;&gt;();\r\n           ListView listview = findViewById(R.id.students);\r\n           JSONObject jsObj = new JSONObject(json_stu);\r\n           JSONArray jsArray = jsObj.getJSONArray(\"Students\");\r\n           for (int i = 0; i &lt; jsArray.length(); i++) {\r\n               HashMap&lt;String, String&gt; stu = new HashMap&lt;&gt;();\r\n               JSONObject obj = jsArray.getJSONObject(i);\r\n               stu.put(\"name\", obj.getString(\"name\"));\r\n               stu.put(\"Branch\", obj.getString(\"Branch\"));\r\n               stu.put(\"institute\", obj.getString(\"institute\"));\r\n               userList.add(stu);\r\n           }\r\n           ListAdapter simpleAdapter = new SimpleAdapter(MainActivity.this, userList, R.layout.list, new String[]{\"name\", \"Branch\", \"institute\"}, new int[]{R.id.StudentName, R.id.Branch, R.id.institute});\r\n           listview.setAdapter(simpleAdapter);\r\n       } catch (JSONException ex) {\r\n           Log.e(\"JsonParser \", \"Exception\", ex);\r\n       }\r\n   }\r\n\r\n   private String getListData() {\r\n       String json_stu1 = \"{ \\\"Students\\\" :[\" +\r\n               \"{\\\"name\\\":\\\"Akshita Shrivastava \\\",\\\"Branch\\\":\\\"Computer Science\\\",\\\"institute\\\":\\\"IIT I\\\"}\" +\r\n               \",{\\\"name\\\":\\\"Peter Potter\\\",\\\"Branch\\\":\\\"Civil\\\",\\\"institute\\\":\\\" IIT R\\\"}\" +\r\n               \",{\\\"name\\\":\\\"Md Farman \\\",\\\"Branch\\\":\\\"Information Technology\\\",\\\"institute\\\":\\\" Bits Pilani\\\"}\" +\r\n               \",{\\\"name\\\":\\\"Vipul Soni\\\",\\\"Branch\\\":\\\"Mechanical\\\",\\\"institute\\\":\\\" MIT\\\"}\" +\r\n               \",{\\\"name\\\":\\\"Shikha Jain\\\",\\\"Branch\\\":\\\"Textile\\\",\\\"institute\\\":\\\" IIIT\\\"}\" +\r\n               \",{\\\"name\\\":\\\"John Samuel\\\",\\\"Branch\\\":\\\"Electrical\\\",\\\"institute\\\":\\\" IIT B\\\"}\" +\r\n               \",{\\\"name\\\":\\\"Rhea Sharma\\\",\\\"Branch\\\":\\\"Mechanical\\\",\\\"institute\\\":\\\"NIT\\\"}] }\";\r\n       return json_stu1;\r\n   }\r\n}<\/pre>\n<p>5.\u00a0Then we\u2019ll run the app and following would be the output:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/Screen.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-77775\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/Screen.png\" alt=\"Android JSON Parsing\" width=\"250\" height=\"444\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/Screen.png 250w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/Screen-84x150.png 84w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/Screen-169x300.png 169w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>In this article, we have read about JSON parsing in Android. We have learned what JSON is, what its key features are and why to choose JSON over XML. We also saw the functions for JSON parsing and then we did JSON Parsing in Android step by step implementation as well.<\/p>\n<p>Thank You.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this DataFlair Android tutorial, we\u2019re going to cover the JSON parsing in Android. Before getting into that, first, know what JSON is. JSON stands for JavaScript Object Notation. It is a format for&#46;&#46;&#46;<\/p>\n","protected":false},"author":10,"featured_media":77776,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18722],"tags":[22253,22257,22255,22254,22256],"class_list":["post-77758","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-json-parsing-in-android","tag-json-parsing-in-android-example","tag-json-parsing-in-android-step-by-step","tag-json-parsing-with-android","tag-read-json-file-android"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JSON Parsing in Android - Step by Step Implementation - DataFlair<\/title>\n<meta name=\"description\" content=\"JSON Parsing in Android - What is JSON, Comparison betwen JSON and XML, JSON parsing step by step implementation and functions.\" \/>\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\/json-parsing-in-android\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JSON Parsing in Android - Step by Step Implementation - DataFlair\" \/>\n<meta property=\"og:description\" content=\"JSON Parsing in Android - What is JSON, Comparison betwen JSON and XML, JSON parsing step by step implementation and functions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/\" \/>\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=\"2020-05-08T12:09:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-25T08:26:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\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=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JSON Parsing in Android - Step by Step Implementation - DataFlair","description":"JSON Parsing in Android - What is JSON, Comparison betwen JSON and XML, JSON parsing step by step implementation and functions.","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\/json-parsing-in-android\/","og_locale":"en_US","og_type":"article","og_title":"JSON Parsing in Android - Step by Step Implementation - DataFlair","og_description":"JSON Parsing in Android - What is JSON, Comparison betwen JSON and XML, JSON parsing step by step implementation and functions.","og_url":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-05-08T12:09:09+00:00","article_modified_time":"2021-08-25T08:26:18+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33"},"headline":"JSON Parsing in Android &#8211; Step by Step Implementation","datePublished":"2020-05-08T12:09:09+00:00","dateModified":"2021-08-25T08:26:18+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/"},"wordCount":608,"commentCount":2,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android.jpg","keywords":["json parsing in android","json parsing in android example","json parsing in android step by step","json parsing with android","read json file android"],"articleSection":["Android Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/","url":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/","name":"JSON Parsing in Android - Step by Step Implementation - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android.jpg","datePublished":"2020-05-08T12:09:09+00:00","dateModified":"2021-08-25T08:26:18+00:00","description":"JSON Parsing in Android - What is JSON, Comparison betwen JSON and XML, JSON parsing step by step implementation and functions.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/05\/JSON-Parsing-with-android.jpg","width":802,"height":420,"caption":"JSON Parsing in android"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/json-parsing-in-android\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Android Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/android\/"},{"@type":"ListItem","position":3,"name":"JSON Parsing in Android &#8211; Step by Step Implementation"}]},{"@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\/a90b082e16aa38d207212d22b0581f33","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team is passionate about delivering top-notch tutorials and resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With expertise in the tech industry, we simplify complex topics to help learners excel. Stay updated with our latest insights.","url":"https:\/\/data-flair.training\/blogs\/author\/dfadteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/77758","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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=77758"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/77758\/revisions"}],"predecessor-version":[{"id":86502,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/77758\/revisions\/86502"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/77776"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=77758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=77758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=77758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}