Description
What you’ll learn
JSON in Action: Build JSON-Based Applications Course
- Understand why JSON is popular as a data interchange format
- The difference between JSON and XML
- Understand why JSON is NOT JavaScript Object
- Learn JSON syntax and data types
- To write JSON data (simple and complex) on your own
- Learn how to use JSON with JavaScript
- To collect the required piece of information even from complex JSON data
- Learn how to contact an API and collect JSON response
- Learn how to use JSON with PHP
- Develop your own applications making use of popular APIs
Requirements
- Basic knowledge of HTML, CSS, JavaScript and PHP would be helpful (not necessary)
- Any text editor and a web browser
Description
This course is structured as follows:
In the first section, you will understand what JSON is, compare JSON and XML and also learn why JSON is not JavaScript Object.
In the second section, you will understand JSON in more detail. You will learn JSON syntax rules and different data types (number, string, boolean, null, array and object) You will also practise to identify different data types in real world JSON data and also to write JSON data on your own.
In the next section, you will understand how easy it is to use JSON with JavaScript. You will learn how to use JSON.parse and JSON.stringify methods to convert JSON data to JavaScript objects and JavaScript objects to JSON strings respectively. You will understand the difference between dot notation and bracket notation. You will also learn how to use XMLHttpRequest object to fetch the .json file from a server.
The fourth section explains how to use AJAX techniques to contact an API and to collect the JSON output returned by the API.
In the next section, we discuss how to use JSON with PHP. This lecture explains json_encode and json_decode methods. This section will be updated to teach you how to use JSON with other programming languages as well.
The last section is the Let’s Develop section where you are going to apply your JSON knowledge to develop some applications on your own. Now there are two applications in this section.
- Currency Converter
- BMI Calculator
The first application “Currency Converter” application contacts a real-world API, collects the JSON data, and performs currency conversion. The second application “BMI Calculator” is a more detailed one. As part of this application, you will be developing a simple API using PHP.