Skip to content

Instantly share code, notes, and snippets.

@Banck
Last active July 7, 2018 12:14
Show Gist options
  • Save Banck/757a77843b5b12305e0adfa23bb11e15 to your computer and use it in GitHub Desktop.
Save Banck/757a77843b5b12305e0adfa23bb11e15 to your computer and use it in GitHub Desktop.
Place.swift
import Foundation
import SwiftyJSON
struct Place: JSONAutoRepresentable{
var id: String?
var name: String?
var position: String?
// sourcery:inline:auto:Place.JSONAutoRepresentable
init(_ json: JSON) {
id = json["id"].string
name = json["name"].string
position = json["position"].string
}
// sourcery:end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment