Argo alternatives and similar libraries
Based on the "JSON" category.
Alternatively, view Argo alternatives based on common mentions on social networks and blogs.
-
HandyJSON
A handy swift json-object serialization/deserialization library -
AlamofireObjectMapper
An Alamofire extension which converts JSON response data into swift objects using ObjectMapper -
Gloss
[Deprecated] A shiny JSON parsing library in Swift :sparkles: Loved by many from 2015-2021 -
EVReflection
Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift -
Decodable
[Probably deprecated] Swift 2/3 JSON unmarshalling done (more) right -
JSONHelper
โ Convert anything into anything in one operation; JSON data into class instances, hex strings into UIColor/NSColor, y/n strings to booleans, arrays and dictionaries of these; anything you can make sense of! -
Genome
A simple, type safe, failure driven mapping library for serializing JSON to models in Swift 3.0 (Supports Linux) -
CodableAlamofire
An extension for Alamofire that converts JSON data into Decodable objects. -
Elevate
Elevate is a JSON parsing framework that leverages Swift to make parsing simple, reliable and composable. -
JSONNeverDie
Auto reflection tool from JSON to Model, user friendly JSON encoder / decoder, aims to never die -
ModelRocket
An iOS framework for creating JSON-based models. Written in Swift. -
Tailor
:necktie:A super fast & convenient object mapper tailored for your needs -
AlamofireJsonToObjects
An Alamofire extension which converts JSON response data into swift objects using EVReflection -
PPJSONSerialization
The Ultimate JSON Serialization for Swift. -
JSONParserSwift
Framework for easily parsing your JSON data directly to Swift object. -
SafeDecoder
A Codable extension to decode arrays and to catch & log all decoding failures
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Argo or a related project?
Popular Comparisons
README
Argo

Argo is a library that lets you extract models from JSON or similar structures in a way that's concise, type-safe, and easy to extend. Using Argo, you won't need to write validation code to ensure that incoming data is of the right type, or to make sure required data fields aren't turning up empty. Argo uses Swift's expressive type system to do that for you, and reports back explicit failure states in case it doesn't find what you've told it to expect.
Argo is the Greek word for swift and the name of the ship used by Jason, son of Aeson, of the Argonauts. Aeson is the JSON parsing library in Haskell that inspired Argo, much like Aeson inspired his son Jason.
Version Compatibility
Note that we're aggressive about pushing master
forward along with new
versions of Swift. Therefore, we highly recommend against pointing at master
,
and instead using one of the releases we've provided.
Here is the current Swift compatibility breakdown:
Swift Version | Argo Version |
---|---|
4.X | master |
3.X | 4.X |
2.2, 2.3 | 3.X |
2.0, 2.1 | 2.X |
1.2 - 2.0 | 1.X |
1.1 | 0.3.X |
Installation
Carthage
Add the following to your Cartfile:
github "thoughtbot/Argo"
Then run carthage update
.
Follow the current instructions in Carthage's README for up to date installation instructions.
Note that if you are using newer versions of Argo, you will need to link both
Argo.framework
and Runes.framework
into your app.
CocoaPods
Add the following to your Podfile:
pod 'Argo'
You will also need to make sure you're opting into using frameworks:
use_frameworks!
Then run pod install
with CocoaPods 0.36 or newer.
Git Submodules
I guess you could do it this way if that's your thing.
Add this repo as a submodule, and add the project file to your workspace. You
can then link against Argo.framework
for your application target.
You will need to do the same for Runes if you are using newer versions of Argo.
Usage tl;dr:
Please note: the example below requires an additional, external module named
Curry which lets us use the curry
function to curry User.init
.
It also imports Runes, which is a dependency of Argo in newer versions. If you are using an older version of Argo, you might not need that import.
import Argo
import Curry
import Runes
struct User {
let id: Int
let name: String
let email: String?
let role: Role
let companyName: String
let friends: [User]
}
extension User: Decodable {
static func decode(_ json: JSON) -> Decoded<User> {
return curry(User.init)
<^> json <| "id"
<*> json <| "name"
<*> json <|? "email" // Use ? for parsing optional values
<*> json <| "role" // Custom types that also conform to Decodable just work
<*> json <| ["company", "name"] // Parse nested objects
<*> json <|| "friends" // parse arrays of objects
}
}
// Wherever you receive JSON data:
let json: Any? = try? NSJSONSerialization.JSONObjectWithData(data, options: [])
if let j: Any = json {
let user: User? = decode(j)
}
For more information, see the [Documentation](Documentation/)
Contributing
See the [CONTRIBUTING] document. Thank you, contributors!
License
Argo is Copyright (c) 2015 thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.
About
Argo is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.
We love open source software! See our other projects or look at our product case studies and hire us to help build your iOS app.
*Note that all licence references and agreements mentioned in the Argo README section above
are relevant to that project's source code only.