Introduction to JavaScript Object Notation(JSON)

gaikwaddavid2022 36 views 16 slides Aug 09, 2024
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

This presentation provides a concise overview of JSON (JavaScript Object Notation), a popular data format used for exchanging information between servers and clients. It covers JSON's structure, including objects and arrays, and its practical applications in web development and APIs. By the end,...


Slide Content

Introduction to JSON

Agenda

Agenda

What is JSON?

What is JSON? JSON stands for J ava S cript O bject N otation. JSON is a syntax for storing and exchanging data. The format was specified by Douglas Crockford. Basically it was designed for human readable data interchange. JSON is text written with JavaScript Object Notation. It has been extended from the JavaScript Scripting Language. The filename extension is . json . JSON internet media type is application/ json .

Uses

Uses of JSON Helps you to transfer data from server. JSON format helps transmit and serialize all types of structured data. Allows you to perform asynchronous data call without the need to the page refresh (AJAX- Asynchronous JavaScript and XML). It is widely used for JavaScript-based application, which includes browser extension and website). You can transmit the data between server and web-application using JSON. We can use JSON with modern programming languages. It is used for writing the JavaScript-based applications that include browser add-on’s. Web services and API’s use the JSON format to get public data.

Characteristics

JSON is easy to read and write. It is lightweight text-based interchange format. JSON is language independent. Characteristics

JSON Data Type

JSON Data Type Numbers String Boolean Null Object Array

Data Types String String in JSON must be written in double quotes. Ex. {“name”: ”John”} Numbers Numbers in JSON must be an integer or a floating point. Ex. {“age”:30} Object Values in JSON can be object Ex. { “employee” : {“name” : ”John”, “age” : 30, “city” : ”New York”} }

Data Types Array Values in JSON can be arrays. Ex. { “employees” : [“john”, “Anna”, “Peter”] } Boolean Values in JSON can be true/false. Ex. {“sale” :true} Null Values in JSON can be null. Ex. {“ middlename ” :null}

JSON Syntax

JSON Syntax Data should be in name/value pairs. Data should be separated by commas. Curly braces should hold objects . Square brackets hold arrays.

Thank you!
Tags