Skip to content

Instantly share code, notes, and snippets.

View jonasz-baron's full-sized avatar

Jonasz Baron jonasz-baron

View GitHub Profile
@jonasz-baron
jonasz-baron / RxAlamofire+Codable.swift
Created October 11, 2017 14:09
RxAlamofire usage with Codable protocol for object mapping. Inspired by: https://gist.github.com/kciter/e6f13119cbf8ad0963a68a5ebc421069
// Model
import Foundation
class Post: Codable {
var id = 0
var userId = 0
var title = ""
var body = ""
}
[
{
"country": "Albania",
"capital": "Tirana",
"logoUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Tirana_from_South.jpg/1200px-Tirana_from_South.jpg"
},
{
"country": "Andorra",
"capital": "Andorra la Vella",
"logoUrl": "https://upload.wikimedia.org/wikipedia/commons/7/71/Andorra_la_vella_felul.jpg"
[
"Ozie Hanrahan",
"Delphine Klein",
"Regan Tienda",
"Tajuana Beatty",
"Daniell Velasco",
"Howard Dittrich",
"Allene Gardenhire",
"Danyell Gross",
"Suzette Flecha",
{
"rating": 4.5
}