Added moduler. /JL
This commit is contained in:
19
moduler/data.json
Normal file
19
moduler/data.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"person": [
|
||||
{
|
||||
"navn": "Shubham",
|
||||
"email": "ksingh.shubh@gmail.com",
|
||||
"job_profil": "intern"
|
||||
},
|
||||
{
|
||||
"navn": "Gaurav",
|
||||
"email": "gaurav.singh@gmail.com",
|
||||
"job_profil": "developer"
|
||||
},
|
||||
{
|
||||
"navn": "Nikhil",
|
||||
"email": "nikhil@geeksforgeeks.org",
|
||||
"job_profil": "Full Time"
|
||||
}
|
||||
]
|
||||
}
|
||||
8
moduler/json1.py
Normal file
8
moduler/json1.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import json as JS
|
||||
|
||||
if __name__ == "__main__":
|
||||
file = open("data.json", "r")
|
||||
data = JS.load(file)
|
||||
file.close()
|
||||
|
||||
print(data)
|
||||
7
moduler/json2.py
Normal file
7
moduler/json2.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import json as JS
|
||||
|
||||
if __name__ == "__main__":
|
||||
with open("data.json", "r") as file:
|
||||
data = JS.load(file)
|
||||
|
||||
print(data)
|
||||
Reference in New Issue
Block a user