TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | BSD |
ReleasedLast Release | Jul 2016 |
Maintained by Jeff Hui.
A simple object data mapper for Objective-C. It aims to solve the data mapping problem well with a high degree of flexibility.
Mapping NSDictionaries to Value Objects is boring work! A lot of the work usually gets spread around in -[initWithDictionary:] methods which has a few drawbacks:
Of course, then you want to convert them from one data format to another:
NSDate
NS_ENUM
valuesBut then you need to handle error cases. You don't want your app to crash, so:
[NSNull null]
and/or nil
And that's what Hydrant aims to solve.
Of course, if you can fully control the API you hit, this library isn't much of a big deal. But for developers that need to interact with APIs you don't directly control. Hydrant can help.
Like cocopods? Add this:
pod "Hydrant", '~>2.0.0'
Or if you prefer living life on the edge:
pod "Hydrant", :git => "https://github.com/jeffh/Hydrant.git"
Alternatively, git submodule add this project and adding it to your project.
Add the Hydrant static library for your dependencies or use the source directly.
Read Getting Started.