I have a query that why “json” is used in code? What is its significance?
@a1swami1 JSON means JavaScript object notation. JSON is a python library used in Data Communication for sending an recieving the data between client and server. For more information visit this Link. click here.
JSON stands for JavaScript Object Notation. It is a lightweight format used for exchanging data between server and a browser. It is easy for humans to read and write. It is easy for machines to parse and generate. Hence, it is very widely used.
JSON is built on two structures:
-
A collection of name/value pairs. In various languages, this is realized as an object , record, struct, dictionary, hash table, keyed list, or associative array.
-
An ordered list of values. In most languages, this is realized as an array , vector, list, or sequence.
The exchange of data can only take place in the form of strings. Therefore, JSON is text. This received text is then converted into a Python Dictionary using the json.loads()
function. Converting the JSON into a dictionary makes it easier for us to retrieve data from the server’s response. Therefore, we use json.loads()
in our code.
Please refer to this video by Corey Schafer to get a better idea of how to work with JSON in Python:
Thank you so much…
JSON denotes JavaScript Object Notation. It is a means for sending and receiving data between Client and Server. It is basically a data-interchange format. Json provides an easy means for client-server communication and is easy for humans to understand. In our code we need a path for our VM to communicate with the Cloud. This path is provided by Json. It is generally in the form of arrays/strings and in our code JSON is text. This received text is then converted into a Python Dictionary using the json.loads()
function.