Posts

Showing posts from January, 2024

JSON: A Beginner's Guide to JavaScript Object Notation

Image
JSON JSON, which stands for JavaScript Object Notation, is a lightweight data interchange format. It is easy for humans to read and write, and easy for machines to parse and generate. JSON is a text format that is language-independent and uses conventions familiar to programmers of many languages, including C, C++, Java, Kotlin, Python, JavaScript, and others. JSON data is represented as key-value pairs, similar to how data is stored in a dictionary in Python or an object in JavaScript. The basic structure of JSON includes: JSON Object: An unordered collection of key-value pairs enclosed in curly braces {}. Each key is a string and is followed by a colon, then its corresponding value. Multiple key-value pairs are separated by commas. Example: { "name" : "Atif Pervaiz" , "age" : 27 , "city" : "Lahore" } JSON Array: An ordered list of values enclosed in square brackets []. Values in an array can be of any data type, including obje