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,...
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, you'll understand how to work with JSON data effectively.
Size: 16.48 MB
Language: en
Added: Aug 09, 2024
Slides: 16 pages
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.