JSON, iska full form to hai JavaScript Object Notation. Ye ek lightweight data interchange format hai. Ye human-readable format hai jise data exchange karne ke liye use kiya jaata hai. JSON ke structure mein key-value pairs hote hain, jise curly braces `{}` mein rakha jaata hai. Har key ek unique identifier hoti hai jo uske corresponding value se associate hoti hai. Isme arrays, objects, strings, numbers, booleans, aur null values store kiye ja sakte hain.
Yeh ek common format hai web applications mein data exchange karne ke liye, kyunki ye readable aur easy to understand hota hai. Iski flexibility aur simplicity ki wajah se, ye programming languages ke across use hota hai, na ki sirf JavaScript mein.
ab aap kahoge ki example to bataao taaki easily samaj saken. To ye raha example
Example of a simple to-do list in JSON format:
{ "toDoList": [ { "task": "Complete homework", "priority": "High", "dueDate": "2023-11-30" }, { "task": "Buy groceries", "priority": "Medium", "dueDate": "2023-12-02" }, { "task": "Call friend", "priority": "Low", "dueDate": "2023-11-29" } ] }
Ismein `toDoList` ek key hai jiska value ek array hai, jismein har item ek to-do task ko represent karta hai. Har task ek object mein define hota hai jismein `task` (task ka naam), `priority` (task ki priority), aur `dueDate` (task ki deadline) keys hain.
Yeh format data ko organized rakhne aur interchange karne ke liye use hota hai, jisse applications tasks ko easily manage aur access kar sakein.