Json Module | Python Tutorials For Absolute Beginners In Hindi #82

Поделиться
HTML-код
  • Опубликовано: 2 янв 2019
  • ►Source Code + Text Tutorial - www.codewithharry.com/videos/...
    ►Full Python tutorials for absolute beginners (Hindi) playlist - • Python Tutorials For A...
    ►Click here to subscribe - / @codewithharry
    Best Hindi Videos For Learning Programming:
    ►Learn Python In One Video - • Learn Python In Hindi ...
    ►Learn JavaScript in One Video - • JavaScript Tutorial
    ►Learn PHP In One Video - • Learn Php In One Video...
    ►Machine Learning Using Python - • Machine Learning Tutor...
    ►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
    ►Advanced Python Tutorials - • Intermediate/Advanced ...
    ►Object Oriented Programming In Python - • Object Oriented Progra...
    ►Python Data Science and Big Data Tutorials - • Python Data Science an...
    Follow Me On Social Media
    ►Website (created using Flask) - www.codewithharry.com
    ►Facebook - / codewithharry
    ►Instagram - / codewithharry
    ►Personal Facebook A/c - / geekyharis
    Twitter - / haris_is_here

Комментарии • 532

  • @CodeWithHarry
    @CodeWithHarry  5 лет назад +191

    Dark theme use kara karu ya fir white theme? Please reply!

    • @ThugLife-ud3ff
      @ThugLife-ud3ff 5 лет назад +11

      White

    • @ThugLife-ud3ff
      @ThugLife-ud3ff 5 лет назад +1

      Sir kya aap apne agle video mai mere channel ko ek shoutout de denge
      Channel Name - #TechTedia

    • @arpitagec9
      @arpitagec9 5 лет назад +6

      White pls, black theme is difficult to read

    • @SurajSingh-mf3vz
      @SurajSingh-mf3vz 5 лет назад +17

      Dark Theme

    • @skpandeyg
      @skpandeyg 5 лет назад +2

      White but please mujhe ye font bataiye kaun sa ha kyoki mae visual studio code use karta hu

  • @vijaygovindani6374
    @vijaygovindani6374 4 года назад +40

    Json.load() kisi bhi file object ko as an argument leta hai jabki json.loads kisi bhi string ko as an argument leta hai..
    sort_keys parameter data k key: value pairs ko sort krne ke kam ata hai

  • @SurajSingh-mf3vz
    @SurajSingh-mf3vz 5 лет назад +57

    json.load() accepts file object.
    ex:
    with open("json_data.json", "r") as content:
    print(json.load(content))

  • @jayeshyadav07
    @jayeshyadav07 3 года назад +15

    Harry bhai
    1-Jason.load :- Ye ek json file (javascript) file kay documents ko read karta hai or usko python may convert karta hai .
    2- sort key parameters in dumps:-
    Ye ek True or False parameters leta hai or
    If we gives parameters True:
    Answer will be in alphabetical order.
    If we gives parameters as False:
    Answer will be in as it is form.

  • @SurajSingh-mf3vz
    @SurajSingh-mf3vz 5 лет назад +16

    Python me json object hamesa unordered hota hai isliye hum usme sort_keys parameter=True pass karte hai jisse ki json object me keys ordered collection me sort ho sake!

  • @babulzha553
    @babulzha553 4 года назад +42

    This is what i have understood:
    json.loads()---------> It is used to convert a json string to an dictonary
    json.dump()---------> It is used to convert a dictonary to an json string.
    josn.load()----------> It is used to read a file which contains an json object
    Can anyone please let me know if my understanding is correct?

    • @felon_loser
      @felon_loser 4 года назад +7

      correct hai bhai. Keep coding, keep researching, keep learning! and keep sleeping

    • @SahilKumar-rz3th
      @SahilKumar-rz3th 4 года назад

      yup! but json.load takes file object which consists of keys and value pairs saperated by : and returns a json object.
      Correct me if i am wrong :)

    • @mampudimpu0015
      @mampudimpu0015 4 года назад

      @@SahilKumar-rz3th correct hai bhai. Keep coding, keep researching, keep learning! and keep sleeping

    • @varunprajapati5838
      @varunprajapati5838 3 года назад

      correct hai bhai. Keep coding, keep researching, keep learning! and keep sleeping

    • @tanaymishra3375
      @tanaymishra3375 3 года назад

      @@SahilKumar-rz3th No you are right

  • @sibuawasthi1095
    @sibuawasthi1095 4 года назад +6

    [1] json.load ( )
    kisi bhi json file ke object ko dictionary ke form mai convert kar deta hai.
    [2]sort_keys parameter in dumps
    agar keys order mai nahi hai OR keys sorted nahi hai to hum json.dumps( ) mai sort_keys =True parameter bhej te hai.
    Simply for sorting the keys.

  • @anshulshirbhate1370
    @anshulshirbhate1370 3 года назад +2

    1) json.load method takes a file oject as an argument, file object is a json written in a file. json.load then converts it in a python dictionary.
    2) sort_keys is the parameter in json.dumps that takes boolean values and returns a sorted json if given true as input value.

  • @nothingwrong988
    @nothingwrong988 4 года назад +5

    json.load(), takes thw file for desirialization, while json.loads(), takes the string i.e. file contect for desirialization. Both returns objects.

  • @rakeshtomar6391
    @rakeshtomar6391 3 года назад +1

    json.loads() method can be used to parse a valid JSON string and convert it into a Python Dictionary. It is mainly used for deserializing native string, byte, or byte array which consists of JSON data into Python Dictionary.

  • @LiveLikeAButterfly
    @LiveLikeAButterfly 4 года назад

    Awesome.. i have read the json concept earlier also.. even then i learnt new things from the video here..

  • @learnandupdatewithbob870
    @learnandupdatewithbob870 4 года назад +1

    bhai aap to knowledge ka bhandar ho
    thanks for everything

  • @sureshsah7711
    @sureshsah7711 2 года назад +3

    json.loads() function is used to access the stored data separately through mentioning the key name (variable/string)

  • @mohammadhamza4597
    @mohammadhamza4597 4 года назад +1

    Thnq for the videos sir
    Always appreciated ❤️🙏

  • @kartikkulshreshtha643
    @kartikkulshreshtha643 3 года назад +1

    sort_keys return krta h sorted keys ko jese ek example h....
    import json
    Dict = {"Name":"Kartik",
    "Age":20,
    "Married":False,
    "Student":True,
    "Car":["BMW","Audi","Lamborgini"],
    "Bikes":["Star City","Apache","Access 125"]}
    print(json.dumps(Dict,sort_keys=True))

  • @funwithfafzu6226
    @funwithfafzu6226 2 года назад

    Task 1 - loads() json. loads() method can be used to parse a valid JSON string and convert it into a Python Dictionary

  • @deveshdubey6776
    @deveshdubey6776 4 года назад

    Json.load ()kisi bhi file object ko json object me change kr deta hai.
    Sort keys parameter in dump: yeh like kisi bhi dictionary me jo bhi keys hai unhe result me sort krna ho (alphabetical) tb use krte hai.

  • @bhaskarmondal6414
    @bhaskarmondal6414 3 года назад

    Happy teachers day Harry vai. Upka videos se main python ka bohot kuch shikha🙏🏻🙏🏻

  • @aritralahiri8321
    @aritralahiri8321 4 года назад

    Json.load() method is used with file whereas Json.loads() is used with strings where s-strings is passed in the parameter not a file object as of Json.load()

  • @tanishjain225
    @tanishjain225 3 года назад +1

    Harry sir aap ke jawab ka answer
    Task1 ka answer :- load() function file ko read karke usko json form ka data banata hai
    Task 2 ka answer :- sort_keys parameter json data ko unke key basis par alphabetical order mai arrange karta hai

  • @subhu143
    @subhu143 3 года назад +2

    Json. load() used for file objects
    Json. Loads takes argument as a file
    Json. dump(). Short key used for sort the data

  • @namanagrawal4868
    @namanagrawal4868 4 года назад

    1)json.load json files ki handling karne ke liye hota hai
    2)sort_keys json module me dumps nam ke method me ek parameter hota hai jo dump ke return value ko sort krne ke liye hota hai

  • @Harshit-ig7sv
    @Harshit-ig7sv 5 лет назад +1

    json.load()
    JavaScript se Python me dict ko import or Python suitable banane ke liye json.load("data.txt (vese hi) ")
    json.dumbs():
    Json ko dump karne ke liye file me, json.dump().
    json.dumps() (dump string) agar sirf ek string chahiye print karne ke liye usme se.

  • @abhaytiwari2175
    @abhaytiwari2175 2 года назад

    sort_key ko Alphabetical order me arranged kr skate hai. load ka use JSON ko Python me convert krne me krte hai aur Dump ka use vice-versa

  • @bikramjitdas2621
    @bikramjitdas2621 5 лет назад +50

    Sir,it would be very kind of you if you create a series on data structures and algorithms from beginners to advanced level,ensuring important topics for interviews and topics to stress upon.Thank you.

    • @drizle9231
      @drizle9231 4 года назад +3

      Yes Please Bhaiya

    • @ntn_ydv
      @ntn_ydv 4 года назад +2

      Bhai please do this

    • @ntn_ydv
      @ntn_ydv 4 года назад +2

      Bhai aapko koi aacha sa channel pata h kya Data Structure n Algos k liye?

    • @Zoroa406
      @Zoroa406 4 года назад +1

      @@ntn_ydv saurab shukla data structure bhaii boohat sexy padata hai sir just try

    • @ntn_ydv
      @ntn_ydv 4 года назад +2

      @@Zoroa406 ok brother

  • @ishtiaqahmad4118
    @ishtiaqahmad4118 4 года назад +4

    It was not cleared me before, now i understand clearly about JSON. Thank you. I.A. Diddiqui 75 Years Old Man Karachi PAKISTAN

  • @shreyakapadia3735
    @shreyakapadia3735 3 года назад

    json.load() ko json file read karne ke liye use kar sakte hain
    Aur json.dumps() me sort_keys ka use key ko ascending me sort karne ki liye use karte hain

  • @adityagavali6048
    @adityagavali6048 2 года назад +9

    json.dumps() is actually. used to convert any python object into a string in JSON and it also its own attributes like "indent" and "sort_keys"
    json.load() is used to read the json doc from file the JSON.

  • @sanchits.4785
    @sanchits.4785 2 года назад

    load deal with parsing file through file object while loads(which is read as load-s; s stands for string) converts string object to json object.

  • @nayan7065
    @nayan7065 Год назад +1

    json.load () string jo api ka output hai usko parse karta hai yaani dictionary mei badalta hai.
    json.sort_keys() json object ke keys ko sort karta hai

  • @reflex2109
    @reflex2109 3 года назад

    sort key parameter wo cheez ha jo apko systemetically help karti tha apke contents ke result ko alphabetically arrange karne mei print karne ke wakt
    Thank you

  • @ayushgupta7500
    @ayushgupta7500 5 лет назад +3

    Sort key parameter se ... Jo bhi humari dictionary ki key hogi vo sorted way m ho jayegi

  • @rakshitraj3550
    @rakshitraj3550 3 года назад +1

    Task 1:
    जसन। लोड () का उपयोग फ़ाइल से JSON दस्तावेज़ को पढ़ने के लिए किया जाता है और json. लोड () का उपयोग JSON स्ट्रिंग दस्तावेज़ को पायथन डिक्शनरी में बदलने के लिए किया जाता है। fp फ़ाइल पॉइंटर का उपयोग टेक्स्ट फ़ाइल, बाइनरी फ़ाइल या JSON फ़ाइल को पढ़ने के लिए किया जाता है जिसमें JSON दस्तावेज़ होता है।
    Task 2 :
    डंपिंग JSON प्रिंटिंग के लिए स्ट्रिंग प्रारूप में JSON ऑब्जेक्ट को क्रमबद्ध करता है। डंपिंग करते समय चाबियों को छांटना कुंजी-मूल्य जोड़े को कुंजियों द्वारा वर्णानुक्रम में सहेजता है।

  • @rohan1765
    @rohan1765 4 года назад

    Json.load() file objects ke sath work karta hai , jaise ham f=open() or with open() as f karte hai usme f accept karega ,
    json.loads() file content leta hai as a string , s stands for string.
    json.dumps() se generate hui json file or json object me contents order main nahi aate sort kiye hua , agar unhe sorted order main chahiye to json.dumps() main sort_keys=True pass kar sakte hai.

  • @ComradeWeredog
    @ComradeWeredog Год назад

    sort_keys dictionary mein sare available data ko ascending order mein arrange karta hain, it is used with the .dumps
    Usage:
    print(json.dumps(variable, sort_keys=True))
    The .load ka use ek json file se data leke usko python mein "read" (It does not convert it to original python form) karne ka hota hain
    Usage:
    f = open("File", "r")
    loader = json.load(File)
    print(loader)

  • @hariomsinghrajput5334
    @hariomsinghrajput5334 2 года назад +1

    json.load() method kisi bhi json file ke data ko read kerke use python dictionary me convert kar deta he .
    Example:
    import json
    # Opening JSON file
    f = open('data.json')
    # returns JSON object as a dictionary
    data = json.load(f)
    print(type(data))
    # Iterating through the json list
    for i in data['Emp_Details']:
    print(i)
    # Closing file
    f.close()

  • @syedahmedrazashah8410
    @syedahmedrazashah8410 4 года назад +3

    if we want to work in python file we use json.loads and json.dumps: and we want to work with json file we use load and dump

  • @satvikmittal4487
    @satvikmittal4487 3 года назад

    task 1-load method parses the JSON from a json file to a dictionary object in python
    task 2- sort_keys true krne se vo keys ke hisaab se ascending order me laga deta hai ya fir kaho ki sort kr deta hai ,jaise {d:1,c:2} ko vo {c:2, d:2} kr dega

  • @Raspace
    @Raspace 5 лет назад

    json.load converts a binary file or text file to a python object.
    but json.loads converts a string to a python object.
    (I think 's' on the loads specifies string)

  • @mustafahozefa2103
    @mustafahozefa2103 2 года назад

    Json load makes a java scrip key / parameter and short it / parsh it and makes it python compatible and display one dictionary in one line and second dict in second

  • @leahkahn5303
    @leahkahn5303 4 года назад +1

    sort_keys parameter: dumps ke andar jo bhi dictionary hoti hai, unnke saare keys ko ek sorted order mein print karwaata hai

  • @anukumari2344
    @anukumari2344 3 года назад

    Task :-2
    sort_keys parameter jo json module ki dumps method m hoti h uska kaam hota h y specify krna ki result sorted hai ya naji ...for ex :- if koi dictonary di hui h and vo alphabetically sorted nahi hai , then if sort_keys parameter ko True krte hai to vo us dict ko sort kr dega.

  • @samuelfrank9947
    @samuelfrank9947 3 года назад

    Thanks a lot

  • @darksoulgaming668
    @darksoulgaming668 3 года назад

    json.load() ye key/value pair mein arrange kardeta hai
    json.dumps(sort_keys=true) ye apke json values ko neatly sort kardeta hai

  • @maowarisa3516
    @maowarisa3516 3 года назад

    Json load() is used for read the json document from file and Json loads() is covert json sting to pyhton dictionary

  • @eriedhotre9438
    @eriedhotre9438 4 года назад +17

    You explain very well. Can you please make a playlist on data structures and algorithms which are required for interviews

    • @ritusharma773
      @ritusharma773 3 года назад

      Playlis of Data structure and algorithm exists on CWH'S channel

    • @subhu143
      @subhu143 3 года назад

      @@ritusharma773 that is in c language bro we need ds algo in python😐

    • @ritusharma773
      @ritusharma773 3 года назад

      @@subhu143 actually my younger brother wrote this comment and he is in 8class . And I don't know What is about it

    • @sayedrazzak9488
      @sayedrazzak9488 Год назад +1

      @@ritusharma773wow that's great
      hug him and give her proper resources
      he would be next Google
      Engineer. Everything is possible

  • @vishalpatil6578
    @vishalpatil6578 3 года назад

    json.loads is used to convert a json file object into dictionary
    sort_keys is used to sort the keys by giving parameter true in json.dumps

  • @ayushgupta7500
    @ayushgupta7500 5 лет назад +2

    Json.load hum use krte h file object ki trha .... Jb kisi file main save kr rakha ho json formate....

  • @himanshu_rohil
    @himanshu_rohil 3 года назад

    json.dumps(x, indent=4, sort_keys=True)
    isme last argument sort_keys hai or agar humne *value = True* likhi to ouput me alphabetically sorted data milega and agar *value = False* diya to as it is rahega jaisa pycharm me likha hai, koi sorting nhi hogi

  • @perawezalam4028
    @perawezalam4028 4 года назад

    thanks for this content

  • @yogeshgheu
    @yogeshgheu 4 года назад

    json.load se files me se kisi json file ko read karte hai jaise file.read() krete hai. json.loads se kisi bhi json string ko python dict. me convert karte hai.

  • @DattPanchal
    @DattPanchal 3 года назад +2

    Jo json.load() hota hai harry bhaiya, wo json ki jo file hoti hai use read karne ke liye use kiya jata hai !!

  • @afsanakhan589
    @afsanakhan589 4 года назад

    tysm bhaiya

  • @rashadarsh1031
    @rashadarsh1031 Год назад

    Love from Bangladesh. Haryy vhai🥰

  • @jitendrarathod6246
    @jitendrarathod6246 4 года назад

    Json.loads is used to parse the string as object
    Where as Json.load is used to parse the whole file as object but required whole path to execute

  • @productive5
    @productive5 2 года назад +1

    Mini task 1... solution..
    Json.load() function json ke data ko python me convert krne ke kaam aata hai ...

  • @harshitachaurasia1246
    @harshitachaurasia1246 4 года назад

    json.load() ---file object ko lekr json object return krta h.
    json object k pass data hota h key value k form me(pair)
    keys aur string values hai json types ke

  • @amitpandey8382
    @amitpandey8382 5 лет назад

    Thanks for json nice harry bhai

  • @sstmax
    @sstmax 3 года назад

    thank-you bhai

  • @ShubhamGupta-qk9uq
    @ShubhamGupta-qk9uq 5 лет назад

    Json load ek file ko read krta ha pr use json m convert krdeta ha
    and json sort_keys result ko alphanatic order m arrange krdeta ha

  • @mr.bhaskar5003
    @mr.bhaskar5003 4 года назад

    json.load() use karne se koi file ko json me convert karke read kar sakte
    but json.loads() me string ko json me convert karte hai

  • @dnyaneshbharambe
    @dnyaneshbharambe 3 года назад +1

    bhai json.load ko kisi json file ko read python file me open karne ke bad use python dictionary me convert karne ke liye use kiya jata ha
    or bhai agar hame sort keys ko true kar diya dumps function me to json string ascending oreder me sort ho jate hai .thanks for your hardwork

  • @muhammednkazi
    @muhammednkazi 4 года назад

    json.load() is used to parse json object from a json file...if i am not
    wrong

  • @priyanujbora9689
    @priyanujbora9689 3 года назад +2

    TASK #1:----------vvvvv
    json.load() is used to read from a json file(where the extension is .json) and convert it into a python dictionary
    TASK #2:----------vvvvv
    sort_keys is a type of parameter in dumps() that sorts the python dictionary according to the keys.

  • @sukdeb5315
    @sukdeb5315 4 года назад

    Great Sir

  • @4WHxRaghuvansh
    @4WHxRaghuvansh 3 года назад

    json.load --> json data jo ki code me likha hua hai, usko readable or dict form me convert karta hai.
    json.loads --> iskokhai aur ki json file ka data read krne k liye use karte hai. usme file Pointer k bhi zroorat hoti hai..
    json.dump --> python dict ko json format me convert karta hai..
    json.dumps -- > python dict data ko, kisi json file me store or dump karta hai. isme file pointer ki zroorat hoti hai !!

  • @IsmailHossain-zk1sp
    @IsmailHossain-zk1sp 3 года назад

    In json.dump sort_keys are used to return the dictionary items in a alphabetical order.

  • @jeenujose4506
    @jeenujose4506 Год назад

    Task 1-
    json load()- Yeh function ek file object leta hai and json object return karta hai.
    Task 2-
    sort_keys parameter-Yeh sort karta hai json objects ko. Humein dumps function mein sort_keys ka value 'True ' set karna hai thaaki humara array of json objects sort ho jaaye.

  • @priyanka89817
    @priyanka89817 3 года назад

    File jisme json object hota hai use read and write karne k liye json. load() use kiya jata hai
    sort_keys parameter ko result me keys ko order karne k liye use karte hai

  • @mdkaifali2163
    @mdkaifali2163 3 года назад

    json.load() json ko python me convert krta hai json load file object ka ek jason object return krta hai aur uss json object me key value pair contain hoke rhta hai....isliye hmm agar koi value ko print krna cahte hai to uss data ka key likhne se hme uska value mil jata hai

  • @lalitchauhan9824
    @lalitchauhan9824 2 года назад +2

    sort_keys is used to sort key pairs of the dictionary in a alphabetical order.

  • @sheruloves9190
    @sheruloves9190 3 года назад

    Task 1:
    loads() mein 's' string ko denote karta hai..
    i.e json.loads() string ko parse karne ki kshamta rakhta hai
    json.load() file jaise object ko parse karta hai
    Task 2:
    json.dumps(data, sort_key=True) ye humare object ko alphabetical order me set karta hai

  • @mateenahmad894
    @mateenahmad894 2 года назад

    json.load() takes a file object and returns the json object.
    A JSON object contains data in the form of key/value.

  • @ManjotSingh-sf5qn
    @ManjotSingh-sf5qn 2 года назад

    #1 json.load se hum kisi bhi json file ko python me open kr sakte hain
    #2 sort_keys paremeter se hum set kr sakte ha(true or false) ki hume alphabetically sorted dictionary chahiye ya nahi aur ye by default false pe set hota ha.

  • @darshanbothra2673
    @darshanbothra2673 3 года назад

    json.dumps() ka sort_keys parameter dictionary ke keys ko sort kar deta hai i.e. alphabetical order se arrange karta hai.

  • @sauravsingh3153
    @sauravsingh3153 3 года назад

    load - it converts json file into a python dictionary while loads convert json variable to python dictionary
    sort keys - if set True(default false hota hai) then we will get out dictionary sorted following the key part

  • @aritralahiri8321
    @aritralahiri8321 4 года назад

    sort key parameter sorts the keys of the dictionary in ascending order

  • @shubhradasgupta691
    @shubhradasgupta691 3 года назад +1

    the load() function must be used with a file object

  • @abhaytiwari2175
    @abhaytiwari2175 2 года назад

    json.load() accepts file object, parses the JSON data, and populates a Python dictionary with the data, and returns it back to you.

  • @himanshu_rohil
    @himanshu_rohil 3 года назад

    json.load( ) file object ko input leta hai or json object return krta h. usme keys string object hoga or value json object hoga

  • @RahulKumar-iz4ot
    @RahulKumar-iz4ot 3 года назад +1

    json.load file se data lega aur dictonary ke format me data return karega
    sort_keys parameter returned json data ko alphabetically sort karega key ke basis pe

  • @gamingzone5851
    @gamingzone5851 3 года назад

    json.loads() hame data ko read karne me help karta hai chahe, wo binary ya text file me kyu na ho. wo use python dictionary me cinvert kar deta hai
    sort_keys hame data's ki values ko sort karne me help karta hai

  • @BABLUKUMARBAMBAL
    @BABLUKUMARBAMBAL 4 года назад

    Json.load()
    Json file ko input Letha hai aur dictionary return kartha hai
    Sort_keys in dumps
    Sort_key ek argument hai dumps method mai jisko true set karne se sabhi keys sort ho jathi hai
    A-Z ya fir numeric mai

  • @ManojSingh-il6vl
    @ManojSingh-il6vl 5 лет назад +1

    #Task2 - sort_keys in dumps is used to arrange the dictionary in an order

  • @vishalrajput3200
    @vishalrajput3200 4 года назад

    load use hota hai convert krne k liye json to dict
    sort_key= alphabetically sort krta hai keys k through

  • @thebakchodvines5190
    @thebakchodvines5190 5 лет назад

    Superb bro

  • @SahilKumar-rz3th
    @SahilKumar-rz3th 4 года назад

    sort_keys parameter bydefault false hota hai aur agar ham json.dumps(sort_keys = True) likhtew hai to sare elements acending order me sort ho jate hai

  • @shivanshyadav8298
    @shivanshyadav8298 3 года назад

    json.load() -----> file input leta hai aur use json form main output deta hai
    json.dumps(sort_keys) -----> key value pair ko keys ke according sort kar deta hai

  • @lalitchauhan9824
    @lalitchauhan9824 2 года назад +2

    json.load() is used to load the data of .json files.

  • @ShivamSingh-kn3gz
    @ShivamSingh-kn3gz 4 года назад

    1. json.load(file object) - y ek file object ko leta h, basically wo ek json file rhti h jisme jo data rhta h wo dictionaries k form me hota h, uss file ko phle open krr k fir json.load() me as a parameter pass krenge th wo ek json object return krta.
    For example-
    suppose json file as temp.json : { "employee details": [
    { "employee name":"Shivam Singh",
    "employee salary": -0.50
    },
    { "employee name": "Harry Bhaiya",
    "Salary" : 5000000000000000
    }
    ]
    }
    with open("temp.json") as f:
    import json
    parse_file = json.load(f)
    for i in parse_file[employee details]:
    print(i)
    2. aur agr sort keys as a parameter pass kiyaa gyaa json.dumbs me th wo agr True hoga th wo sorted order me ho jaayenge, nhi th default False hota h th dictionary k th wo sorted order nhi hogaa.

  • @deepakkumarmohanty616
    @deepakkumarmohanty616 2 года назад +1

    Yes json.load ek string ko parse kar ke dictionary mai convert kar ta hai
    Sort key parameter bata ta hai ki outputs sorted hai ki nehi

  • @ranasagar699
    @ranasagar699 4 года назад

    Load function is used to read the json document from the file

  • @muhammadwajihshamim4752
    @muhammadwajihshamim4752 3 года назад

    Task 1 : json.load file ko load krne k liye use hota hai
    Task 2 : agar ap dictionary bana rahe ho or sort keys parameter use kare to dictionary alphabetical order mai show hogi

  • @ShubhamSharma-zb9uh
    @ShubhamSharma-zb9uh 3 года назад

    4:09 .......The json. load() is used to read the JSON document from file

  • @rahimmahat0007
    @rahimmahat0007 3 года назад

    json.loads is used for ison string and json.load is used to parse json file

  • @princetanwar5694
    @princetanwar5694 4 года назад

    540 your really awesome teacher

  • @byteapps
    @byteapps 3 года назад

    json.load() is use to read the json documentation from file.

  • @SurajGusain-uo3di
    @SurajGusain-uo3di 3 года назад

    Json.load() method ko hum esliya use karta hae when we want to manipulate data in Jason file or another file stored on disk.
    Sort key parameter In dumbs() method mae esliya use karta hae Taki hum yae check kara ki result joa hae woa sorted hea ya nahi .

  • @WHITEDEVIL-nu5og
    @WHITEDEVIL-nu5og 3 года назад

    file main se json document ko read karne ke liye json.load ka use kiya jata h
    at the other hand json main string ko python dictionary banane ke liye json.loads ka use kiye jata h

  • @vpaliwar
    @vpaliwar 4 года назад

    json.load is used to read from file. sort_keys= True is used to sort dumps.