{"id":21635691,"url":"https://github.com/levantaj/anycodable","last_synced_at":"2025-09-20T22:59:45.322Z","repository":{"id":50099016,"uuid":"166370286","full_name":"levantAJ/AnyCodable","owner":"levantAJ","description":"Decode [String: Any] for Codable","archived":false,"fork":false,"pushed_at":"2024-08-14T06:41:23.000Z","size":356,"stargazers_count":82,"open_issues_count":6,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-06T09:48:52.382Z","etag":null,"topics":["any","array","cocoapods","codable","dictionary","ios","json","jsondecoder","jsonencoder","swift","xcode"],"latest_commit_sha":null,"homepage":"","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/levantAJ.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-18T08:23:50.000Z","updated_at":"2025-05-30T13:21:30.000Z","dependencies_parsed_at":"2024-11-25T06:15:19.603Z","dependency_job_id":null,"html_url":"https://github.com/levantAJ/AnyCodable","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"d15b0420338bf2245ee56510d3f9dbb26e65b94a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/levantAJ/AnyCodable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FAnyCodable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FAnyCodable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FAnyCodable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FAnyCodable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levantAJ","download_url":"https://codeload.github.com/levantAJ/AnyCodable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FAnyCodable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276169663,"owners_count":25596956,"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","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["any","array","cocoapods","codable","dictionary","ios","json","jsondecoder","jsonencoder","swift","xcode"],"created_at":"2024-11-25T03:24:02.829Z","updated_at":"2025-09-20T22:59:45.289Z","avatar_url":"https://github.com/levantAJ.png","language":"Swift","readme":"\u003cp align=\"center\" \u003e\n  \u003cimg src=\"icon.png\" title=\"AnyCodable logo\" width='444' float=left\u003e\n\u003c/p\u003e\n\n[![CocoaPods](https://img.shields.io/cocoapods/p/AnyCodable.svg)](https://cocoapods.org/pods/AnyCodable)\n[![CocoaPods](https://img.shields.io/cocoapods/v/AnyCodable.svg)](http://cocoapods.org/pods/AnyCodable)\n[![Pod License](https://cocoapod-badges.herokuapp.com/l/AnyCodable/badge.png)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![Build Status](https://travis-ci.org/levantAJ/AnyCodable.svg?branch=master)](https://travis-ci.org/levantAJ/AnyCodable)\n\n# AnyCodable or DynamicCodable 😝\nThis library to facilitate decode and encode `[String: Any]`, `[Any]`\n\n## Requirements\n\n- iOS 8.0 or later\n- Xcode 10.0 or later\n\n## Installation\nThere is a way to use AnyCodable in your project:\n\n- using CocoaPods\n\n### Installation with CocoaPods\n\n```\npod 'DynamicCodable', '1.0'\n```\n### Build Project\n\nAt this point your workspace should build without error. If you are having problem, post to the Issue and the\ncommunity can help you solve it.\n\n## How To Use\n\n```swift\nimport DynamicCodable\n\nstruct YourObject: Codable {\n    var dict: [String: Any]\n    var array: [Any]\n    var optionalDict: [String: Any]?\n    var optionalArray: [Any]?\n\n    enum CodingKeys: String, CodingKey {\n        case dict\n        case array\n        case optionalDict\n        case optionalArray\n    }\n\n    init(from decoder: Decoder) throws {\n        let values = try decoder.container(keyedBy: CodingKeys.self)\n        dict = try values.decode([String: Any].self, forKey: .dict)\n        array = try values.decode([Any].self, forKey: .array)\n        optionalDict = try values.decodeIfPresent([String: Any].self, forKey: .optionalDict)\n        optionalArray = try values.decodeIfPresent([Any].self, forKey: .optionalArray)\n    }\n\n    func encode(to encoder: Encoder) throws {\n        var container = encoder.container(keyedBy: CodingKeys.self)\n        try container.encode(dict, forKey: .dict)\n        try container.encode(array, forKey: .array)\n        try container.encodeIfPresent(optionalDict, forKey: .optionalDict)\n        try container.encodeIfPresent(optionalArray, forKey: .optionalArray)\n    }\n}\n\n```\n\n## Author\n- [Tai Le](https://github.com/levantAJ)\n\n## Communication\n- If you **found a bug**, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request.\n\n## Licenses\n\nAll source code is licensed under the [MIT License](https://raw.githubusercontent.com/levantAJ/AnyCodable/master/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevantaj%2Fanycodable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevantaj%2Fanycodable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevantaj%2Fanycodable/lists"}