Challenge 2: JSON Round Trip — Solution require "json" profile = { name: "Philip", email: "philip@example.com", tags: ["ruby", "php", "python"] } json_string = profile.to_json puts json_string parsed = JSON.parse(json_string, symbolize_names: true) puts parsed[:name] puts parsed.keys.first.class =begin Output: {"name":"Philip","email":"philip@example.com","tags":["ruby","php","python"]} Philip Symbol Notes: - profile.to_json converts the hash into a plain JSON string — the output shows plain "name" rather than the Ruby-specific :name symbol syntax, because JSON itself has no concept of symbols at all. - JSON.parse(json_string, symbolize_names: true) explicitly asks Ruby to convert every key back into a symbol as it parses; without that option, parsed.keys.first.class would print String instead of Symbol. - This demonstrates the chapter's warning directly: JSON round-trips through plain strings by default, and symbolize_names: true is required to get symbol keys back, matching the original hash's key type. =end