All Projects → devxoul → RxJSON

devxoul / RxJSON

Licence: MIT license
RxSwift wrapper for JSON

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to RxJSON

RxCocoa-Texture
RxCocoa Extension Library for Texture.
Stars: ✭ 98 (+196.97%)
Mutual labels:  rxswift
SwiftObserver
Elegant Reactive Primitives for Clean Swift Architecture #NoRx
Stars: ✭ 14 (-57.58%)
Mutual labels:  rxswift
Boomerang
Swift micro-framework for MVVM (Model-View-ViewModel) native applications.
Stars: ✭ 34 (+3.03%)
Mutual labels:  rxswift
RxDisplayLink
RxDisplayLink reactive wrapper for CADisplayLink
Stars: ✭ 25 (-24.24%)
Mutual labels:  rxswift
RxBatteryManager
A Reactive BatteryManager in Swift for iOS
Stars: ✭ 21 (-36.36%)
Mutual labels:  rxswift
WWDCast
The unofficial WWDC application for iOS
Stars: ✭ 22 (-33.33%)
Mutual labels:  rxswift
aboon-ios
aboonは二人から始まるiOSクーポンアプリです。
Stars: ✭ 15 (-54.55%)
Mutual labels:  rxswift
MVVM-Templates
Templates for MVVM architecture for swift (based on RxSwift)
Stars: ✭ 14 (-57.58%)
Mutual labels:  rxswift
Sensor
A fresh look at iOS development
Stars: ✭ 37 (+12.12%)
Mutual labels:  rxswift
swift-boilerplate
Clean Architecture for iOS projects (Swift + Programmatically UI + MVC + RxSwift + Auto Layout Visual Format + REST + JWT)
Stars: ✭ 14 (-57.58%)
Mutual labels:  rxswift
LXFProtocolTool
由Swift中协议方式实现功能的实用工具库【Refreshable、EmptyDataSetable 支持 Rx 】
Stars: ✭ 101 (+206.06%)
Mutual labels:  rxswift
SwiftArchitectureWithPOP
A base architecture written in swift and protocol oriented, for building new apps easily and quickly
Stars: ✭ 28 (-15.15%)
Mutual labels:  rxswift
Monotone
An Unsplash Application for iOS.
Stars: ✭ 181 (+448.48%)
Mutual labels:  rxswift
RxMVC-Swift
Unidirectional MVC with ReactiveX
Stars: ✭ 87 (+163.64%)
Mutual labels:  rxswift
Gank
A iOS Client of gank.io written in Swift4.0 and Build with RxSwift + Moya + MVVM.
Stars: ✭ 80 (+142.42%)
Mutual labels:  rxswift
RxReusable
Reusable cells and views for RxSwift
Stars: ✭ 23 (-30.3%)
Mutual labels:  rxswift
Swift-VIPER-Rx
VIPER architecture model. Show a single class of responsibility.
Stars: ✭ 19 (-42.42%)
Mutual labels:  rxswift
StackBarButtonItem
🔲 StackBarButtonItem can use BarButtonItem like StackView
Stars: ✭ 55 (+66.67%)
Mutual labels:  rxswift
GitTime
GitTime is GitHub Tracking App. Using ReactorKit, RxSwift, Moya.
Stars: ✭ 55 (+66.67%)
Mutual labels:  rxswift
RxSwift-Workshops
EL Passion - RxSwift Workshops
Stars: ✭ 41 (+24.24%)
Mutual labels:  rxswift

RxJSON

Swift CocoaPods Build Status codecov

RxSwift wrapper for JSON.

At a Glance

This is an example of converting a json dictionary observable to a string observable:

URLSession.shared.rx.json(url: "https://api.github.com/repos/ReactorKit/ReactorKit")
  .mapJSON("owner")              // Observable<Any> -> Observable<Any>
  .mapJSON("login", String.self) // Observable<Any> -> Observable<String>
  .bind(to: ownerNameLabel.rx.text)

mapJSON() supports both JSON dictionary and array:

// Dictionary
Observable<Any>.mapJSON("key")           // Observable<Any>
Observable<Any>.mapJSON("key", Int.self) // Observable<Int>

// Array
Observable<Any>.mapJSON(at: 2)              // Observable<Any>
Observable<Any>.mapJSON(at: 3, String.self) // Observable<String>

mapJSON() will throw a RxJSONError when there's no value for given accessor or fails to cast to a given type:

// Dictionary
source.mapJSON("unknownKey")    // Event.error(RxJSONError.valueNotFound)
source.mapJSON("name", Int.key) // Event.error(RxJSONError.castingFailed)

// Array
source.mapJSON(at: -1)          // Event.error(RxJSONError.valueNotFound)
source.mapJSON(at: 0, Int.key)  // Event.error(RxJSONError.castingFailed)

Installation

Contributing

Any discussions and pull requests are welcomed 💖

To create a Xcode project:

$ swift package generate-xcodeproj

License

RxJSON is under MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].