Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import Foundation
struct XKCD: Codable {
let month: String
let num: Int
let link, year, news, safeTitle: String
let transcript, alt: String
let img: String
let title, day: String
enum CodingKeys: String, CodingKey {
case month, num, link, year, news, transcript,
alt, img, title, day, safeTitle = "safe_title"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment