Chapter 7
Data Serialization
Section 4
Level 7 - Problem 3
Write a program that can serialize a list of movies, as defined for the previous problems, to a JSON file. Each movie has a numerical identifier, title, release year, length in minutes, a list of directors, a list of writers, and a list of casting roles with actor name and character name. The following is an example of the expected JSON format: { "movies": [{ "id": 9871, "title": "Forrest Gump", "year": 1994, "length": 202, "cast": [{ "star": "Tom Hanks", "name": "Forrest Gump" }, { "star": "Sally Field", "name": "Mrs. Gump" }, { "star": "Robin Wright", "name": "Jenny Curran" }, { "star": "Mykelti Williamson", "name": "Bubba Blue" } ], "directors": ["Robert Zemeckis"], "writers": ["Winston Groom", "Eric Roth"] }] }