Challenge 1: Round-Trip a Dict Through JSON — Possible Solution ==================================================================== import json product = {"name": "Widget", "price": 9.99, "in_stock": True} json_string = json.dumps(product) print(json_string) restored = json.loads(json_string) print(restored) print(product == restored) Output: {"name": "Widget", "price": 9.99, "in_stock": true} {'name': 'Widget', 'price': 9.99, 'in_stock': True} True WHY THIS WORKS AS AN ANSWER ------------------------------ json.dumps(product) reuses the chapter's own dumps() example exactly — converting the Python dict into a JSON-formatted string. Note that in_stock's Python True becomes JSON's lowercase true in the printed string, matching the chapter's own type-mapping table (True/False <-> true/false). json.loads(json_string) reuses the chapter's own loads() call to parse that JSON string back into a fresh Python dict — restored is a completely new dict object, built entirely from the string, with no direct connection to the original product dict in memory. product == restored reuses plain dict equality comparison (dicts compare equal when they have the same keys and values, regardless of object identity) to confirm the round trip was lossless: the string "Widget", the float 9.99, and the boolean True all survived being converted to JSON and back exactly as they started, which is why the comparison prints True — nothing was silently changed or lost in the dumps()-then-loads() round trip.