{"id":13990712,"url":"https://github.com/devxoul/RxJSON","last_synced_at":"2025-07-22T13:31:01.994Z","repository":{"id":43308747,"uuid":"92623281","full_name":"devxoul/RxJSON","owner":"devxoul","description":"RxSwift wrapper for JSON","archived":false,"fork":false,"pushed_at":"2019-06-14T11:47:37.000Z","size":20,"stargazers_count":33,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-19T23:14:45.103Z","etag":null,"topics":["json","rxswift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devxoul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-27T20:47:31.000Z","updated_at":"2024-04-11T11:14:13.000Z","dependencies_parsed_at":"2022-08-27T14:28:16.079Z","dependency_job_id":null,"html_url":"https://github.com/devxoul/RxJSON","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FRxJSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FRxJSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FRxJSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FRxJSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devxoul","download_url":"https://codeload.github.com/devxoul/RxJSON/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226928654,"owners_count":17704608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","rxswift"],"created_at":"2024-08-09T13:03:08.452Z","updated_at":"2024-11-29T10:31:26.658Z","avatar_url":"https://github.com/devxoul.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# RxJSON\n\n![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)\n[![CocoaPods](http://img.shields.io/cocoapods/v/RxJSON.svg)](https://cocoapods.org/pods/RxJSON)\n[![Build Status](https://travis-ci.org/devxoul/RxJSON.svg?branch=master)](https://travis-ci.org/devxoul/RxJSON)\n[![codecov](https://img.shields.io/codecov/c/github/devxoul/RxJSON.svg)](https://codecov.io/gh/devxoul/RxJSON)\n\nRxSwift wrapper for JSON.\n\n## At a Glance\n\nThis is an example of converting a json dictionary observable to a string observable:\n\n```swift\nURLSession.shared.rx.json(url: \"https://api.github.com/repos/ReactorKit/ReactorKit\")\n  .mapJSON(\"owner\")              // Observable\u003cAny\u003e -\u003e Observable\u003cAny\u003e\n  .mapJSON(\"login\", String.self) // Observable\u003cAny\u003e -\u003e Observable\u003cString\u003e\n  .bind(to: ownerNameLabel.rx.text)\n```\n\n`mapJSON()` supports both JSON dictionary and array:\n\n```swift\n// Dictionary\nObservable\u003cAny\u003e.mapJSON(\"key\")           // Observable\u003cAny\u003e\nObservable\u003cAny\u003e.mapJSON(\"key\", Int.self) // Observable\u003cInt\u003e\n\n// Array\nObservable\u003cAny\u003e.mapJSON(at: 2)              // Observable\u003cAny\u003e\nObservable\u003cAny\u003e.mapJSON(at: 3, String.self) // Observable\u003cString\u003e\n```\n\n`mapJSON()` will throw a `RxJSONError` when there's no value for given accessor or fails to cast to a given type:\n\n```swift\n// Dictionary\nsource.mapJSON(\"unknownKey\")    // Event.error(RxJSONError.valueNotFound)\nsource.mapJSON(\"name\", Int.key) // Event.error(RxJSONError.castingFailed)\n\n// Array\nsource.mapJSON(at: -1)          // Event.error(RxJSONError.valueNotFound)\nsource.mapJSON(at: 0, Int.key)  // Event.error(RxJSONError.castingFailed)\n```\n\n## Installation\n\n* **Using [CocoaPods](https://cocoapods.org)**:\n\n    ```ruby\n    pod 'RxJSON'\n    ```\n\n* **Using [Carthage](https://github.com/Carthage/Carthage)**:\n\n\n    This is not supported yet. See [Carthage#1945](https://github.com/Carthage/Carthage/pull/1945) for details.\n\n## Contributing\n\nAny discussions and pull requests are welcomed 💖\n\nTo create a Xcode project:\n\n```console\n$ swift package generate-xcodeproj\n```\n\n## License\n\nRxJSON is under MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2FRxJSON","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevxoul%2FRxJSON","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2FRxJSON/lists"}