Skip to content

Instantly share code, notes, and snippets.

@ashishkakkad8
Created August 21, 2022 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashishkakkad8/a7eaa4ea40434640cd2ea2169e9a1858 to your computer and use it in GitHub Desktop.
Save ashishkakkad8/a7eaa4ea40434640cd2ea2169e9a1858 to your computer and use it in GitHub Desktop.
Models for Contacts JSON Response
//
// Models.swift
// APISwiftUI
//
// Created by Kode on 04/08/22.
//
import Foundation
// MARK: - ContactResult
struct ContactResult: Codable {
let contacts: [Contact]?
}
// MARK: - Contact
struct Contact: Codable, Identifiable {
let id = UUID()
let name, email, address: String?
let gender: String?
let phone: Phone?
}
// MARK: - Phone
struct Phone: Codable {
let mobile, home, office: String?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment