Jason or is a shorthand way of saying JavaScript object notation it's a way to store and send data in a format that is both easy to read and easy for computers to understand even though JavaScript is in the name Jason is not limited to JavaScript it works with almost every programming language including python Java and PHP think of Jason as a simplified way to represent data for example if you want to store information about a person you could write it like this first let's start with curly braces in Jason curly braces are used to define an object everything inside the curly braces represents key value pairs that store data for example here name is the key and Jake is the value in Jason keys are always enclosed in double quotes and string values should also be enclosed in double quotes then we add the second key value pair the key is age and the value is 25 unlike string values numbers in Json do not need to be enclosed in quotes this allows Jason to differentiate between text and numerical data now for the third key value pair here Hobbies is the key and the value is an array in Jason arrays are enclosed in square brackets and can contain multiple values separated by commas the values inside this array are swimming and basketball both of which are strings and must be enclosed in double quotes each key value pair is separated by a comma except for the last one the Json structure remains enclosed within curly braces to complete the object this structure allows us to represent multiple types of data including strings numbers and arrays in a structured format for this to truly be a Json file we need to change the file extension tojson this ensures that the file is recognized as a Json document and can be properly interpreted by programs that read Json data now that we understand how Json structures data let's explore how Jason objects can be even more powerful by nesting data within them for example the address key holds an object as its value containing three properties Street City and zip this nesting allows us to structur related information neatly in Json an object can contain another object as a value this is done by defining a key and assigning an entire object as its value this approach is useful when we need to represent structured data with multiple levels here the address object contains another nested object coordinates which stores latitude and longitude values this deep nesting is useful for representing structured information such as geographical data but why is nesting adjacent powerful Jason naturally represents relationships between data in a hierarchical manner making it ideal for real world applications like user profiles product cataloges and API responses instead of using multiple separate objects Jason allows for improved organization by nesting related information together enhancing readability and maintaining a clear structure many apis use Nest adjacent structures to return complex data for instance a user profile response from a web service might look like this this Json object represents a user with nested data for contact information and preferences this structure makes it easy to access and manage different levels of information efficiently now that you know what Json is and how it works the next step is accessing Json data Json is just text so you need a programming language to read and manipulate it let's go over how this works using JavaScript and python two of the most common languages that deal with Json for example let's say we are accessing a product details Json which contains information about a laptop including its name brand price and specifications the Json data might look like this we have a product name brand price and an object containing specifications in JavaScript to easily access the data we want we need to convert the Json into an object this is typically done using the Json parse method if we are fetching data using fetch we can convert the response to Json immediately using Json function to retrieve the data we can use do notation or bracket notation for example if we want to retrieve the product name we can simply type product. product name or product square bracket and then double quote product name this will return the data we want using dot notation or bracket notation if we also need to access nested data such as the storage within the specs object we can type product. specs and then storage or product square bracket and then specs with a double quotation and then square bracket and then with storage as its value while in Python we can work with Json data by parsing it into a dictionary using the Json module this allows us to access and manipulate the data just like a normal python dictionary now instead of using Json pars we use Json loads in both languages once the Json is parsed into an object in JavaScript or a dictionary in Python you can access the data using the respective notation systems dot notation or bracket notation in JavaScript and bracket notation in Python and I know we've discussed a lot of Concepts today which is why we've made a pdf version of this video it's free but we would really appreciate any support you give to the channel mastering these techniques will allow you to efficiently handle and manipulate Json data making it easier to work with apis databases and configuration files while keeping your code clean and maintainable we will continue discussing many interesting topics like this on our channel so make sure to subscribe to stay tuned well that's it for now novas thank you for watching watching [Music]