Brick alternatives and similar libraries
Based on the "JSON" category.
Alternatively, view Brick 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! -
CodableAlamofire
An extension for Alamofire that converts JSON data into Decodable objects. -
Genome
A simple, type safe, failure driven mapping library for serializing JSON to models in Swift 3.0 (Supports Linux) -
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
WorkOS - The modern identity platform for B2B SaaS
* 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 Brick or a related project?
Popular Comparisons
README
Brick
Description
Brick is a generic view model for both basic and complex scenarios.
Mapping a basic table view cells is as easy as pie, if you have more properties, you can use the meta
dictionary to add all additional properties that you might need. It also supports relations so that you can nest view models inside of view models.
public struct Item: Mappable {
public var index = 0
public var title = ""
public var subtitle = ""
public var text = ""
public var image = ""
public var kind = ""
public var action: String?
public var size = CGSize(width: 0, height: 0)
public var meta = [String : AnyObject]()
}
- .index Calculated value to determine the index it has inside of the component.
- .title
The headline for your data, in a
UITableViewCell
it is normally used fortextLabel.text
but you are free to use it as you like. - .subtitle
Same as for the title, in a
UITableViewCell
it is normally used fordetailTextLabel.text
. - .text
This is an optional property that can be used for larger amount of text needed to describe your
Item
- .image Can be either a URL string or a local string, you can easily determine if it should use a local or remote asset in your view.
- .kind
Is used for the
reuseIdentifier
of yourUITableViewCell
orUICollectionViewCell
. - .action Action identifier for you to parse and process when a user taps on a list item. We recommend Compass as centralized navigation system.
- .size
Can either inherit from the
UITableViewCell
/UICollectionViewCell
, or be manually set by the height calculations inside of your view. - .meta This is used for extra data that you might need access to inside of your view, it can be a hex color, a unique identifer or additional images for your view.
Usage
let item = Item(
title: "John Hyperseed",
subtitle: "Build machine",
meta: [
"operatingSystem" : "OS X",
"xcodeVersion" : 7.3
])
print(item.meta("operatingSystem", "")) // prints "OS X"
print(item.meta("xcodeVersion", 0.0)) // prints 7.3
Installation
Brick is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Brick'
Brick is also available through Carthage. To install just write into your Cartfile:
github "hyperoslo/Brick"
Author
Hyper Interaktiv AS, [email protected]
Contributing
We would love you to contribute to Brick, check the CONTRIBUTING file for more info.
License
Brick is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the Brick README section above
are relevant to that project's source code only.