Unboxedalamofire

[Deprecated] Alamofire + Unbox: the easiest way to download and decode JSON into swift objects.
Alternatives To Unboxedalamofire
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Swiftyjson22,069
7,7772 months ago19March 28, 2021131mitSwift
The better way to deal with JSON data in Swift.
Tswechat3,470
4 years ago21mitSwift
A WeChat alternative. Written in Swift 5.
Alamofireobjectmapper2,642
892a year ago26September 03, 201958mitSwift
An Alamofire extension which converts JSON response data into swift objects using ObjectMapper
Evreflection936
1094 years ago194February 18, 201917otherSwift
Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift
Codablealamofire749
302 years ago5April 21, 20202mitSwift
An extension for Alamofire that converts JSON data into Decodable objects.
Daisynet361
10 months ago11December 26, 20216mitSwift
1. - Alamofire与Cache封装 , 更容易存储请求数据. 2. - 封装Alamofire下载,使用更方便
Ws Deprecated353
3 years ago9December 13, 2019n,ullmitSwift
⚠️ Deprecated - (in favour of Networking) :cloud: Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing)
Serpent287
32 years ago3October 22, 201811mitSwift
A protocol to serialize Swift structs and classes for encoding and decoding.
Realhttp243
7 months ago20July 23, 20226mitSwift
🌀swift async http client - fast, lightweight, type-safe
Alamofirejsontoobjects156
175 years ago12October 22, 20181otherSwift
An Alamofire extension which converts JSON response data into swift objects using EVReflection
Alternatives To Unboxedalamofire
Select To Compare


Alternative Project Comparisons
Readme

UnboxedAlamofire

⚠️ DEPRECATED

UnboxedAlamofire is deprecated as well as Unbox is deprecated in favor of Swift’s built-in Codable API.


Build Status CocoaPods Compatible Carthage Compatible Platform

Alamofire + Unbox: the easiest way to download and decode JSON into swift objects.

Features

  • [x] Unit tested
  • [x] Fully documented
  • [x] Mapping response to objects
  • [x] Mapping response to array of objects
  • [x] Keypaths
  • [x] Nested keypaths
  • [x] For Swift 2.x use v. 1.x and swift2 branch
  • [x] For Swift 3.x use v. 2.x

Usage

Objects you request have to conform Unboxable protocol.

Get an object

Alamofire.request(url, method: .get).responseObject { (response: DataResponse<Candy>) in
    // handle response
    let candy = response.result.value
    
    // handle error
    if let error = response.result.error as? UnboxedAlamofireError {
        print("error: \(error.description)")
    }
}

Get an array

Alamofire.request(url, method: .get).responseArray { (response: DataResponse<[Candy]>) in
    // handle response
    let candies = response.result.value
    
    // handle error
    if let error = response.result.error as? UnboxedAlamofireError {
        print("error: \(error.description)")
    }
}

KeyPath

Also you can specify a keypath in both requests:

Alamofire.request(url, method: .get).responseObject(keyPath: "response") { (response: DataResponse<Candy>) in
    // handle response
    let candy = response.result.value
    
    // handle error
    if let error = response.result.error as? UnboxedAlamofireError {
        print("error: \(error.description)")
    }
}

Installation

CocoaPods

pod 'UnboxedAlamofire', '~> 2.0'

Carthage

github "serejahh/UnboxedAlamofire" ~> 2.0
Popular Json Projects
Popular Alamofire Projects
Popular Data Formats Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Swift
Json
Mapping
Alamofire