Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
48 lines (34 loc) · 1.33 KB

File metadata and controls

48 lines (34 loc) · 1.33 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
'''
{
"album_title":"Yellow Submarine",
"release_year":1966 ,
"won_grammy": false,
"band": "The Beatles",
"musicians": ["John Lennon", "Paul McCartney", "George Harrison", "Ringo Starr"],
"studio": {"studio_name": "Abbey Road Studios", "location": "London, England"}
}
'''
import json
print(dir(json))
album_json_file = open("album.txt", "r")
album = json.load(album_json_file)
album_json_file.close()
print(album)
print("Object type: ", type(album))
print("Album Title: ", album['album_title'])
print("Release Year: ", album['release_year'])
album_s_json_file = """{"album_title" : "Yellow Submarine",
"release_year" : 1966,
"won_grammy" : false,
"band" : "The Beatles",
"album_sale": null,
"musicians" : ["John Lennon", "Paul McCartney", "George Harrison", "Ringo Starr"],
"studio" : {"studio_name": "Abbey Road Studios", "location": "London, England"}
}"""
album_s = json.loads(album_s_json_file)
print(album_s)
album = {'album_title': 'Yellow Submarine', 'release_year': 1966, 'won_grammy': False,
'band': 'The Beatles', 'album_sale': None, 'musicians': ['John Lennon', 'Paul McCartney', 'George Harrison', 'Ringo Starr'],
'studio': {'studio_name': 'Abbey Road Studios', 'location': 'London, England'}}
print(json.dumps(album))
print(type(json.dumps(album)))
Morty Proxy This is a proxified and sanitized view of the page, visit original site.