- Its common way of storing and working with data, which means working with
- Objects
- Arrays
An example of Json:(nested storing of data using array and objects)
[
{
"name": "Meowsy",
"species": "cat",
"foods": {
"likes": [
"tuna",
"catnip"
],
"dislikes": [
"ham",
"zucchini"
]
}
},
{
"name": "Barky",
"species": "dog",
"foods": {
"likes": [
"bones",
"carrots"
],
"dislikes": [
"tuna"
]
}
},
{
"name": "Purrpaws",
"species": "cat",
"foods": {
"likes": [
"mice"
],
"dislikes": [
"cookies"
]
}
}
]
or
- TO use Javascript in AJAX to Load the JSON data by visiting this url - JsonExample on the fly i.e without reloading the page.
- we need to respond to on click button events
- add new html to the page based on the content of our data variable
- only run our AJAX call when the the event of button click is triggered.
-The process of sending and receving data without a page reload is known as Ajax
- A -asynchronous (means in the background or not requiring the page refresh)
- J -Javascript
- A -and
- X -XML (data format very similar to JSON) since in recent year
JSON have replaced XML as the most popular data form since XML was very important for very long time and so was very important in the history of web development therefore like a tribute we still call 'AJAX' but not 'AJAJ'
- Very Helpful Youtube Video