{"id":18096105,"url":"https://github.com/jkolb/jasoom","last_synced_at":"2025-04-06T03:23:22.273Z","repository":{"id":64060199,"uuid":"48059712","full_name":"jkolb/Jasoom","owner":"jkolb","description":"An easy to use, type safe, Swift wrapper for NSJSONSerialization","archived":false,"fork":false,"pushed_at":"2015-12-17T14:43:13.000Z","size":9,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T20:17:58.643Z","etag":null,"topics":[],"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/jkolb.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":"2015-12-15T17:54:23.000Z","updated_at":"2016-01-14T03:15:20.000Z","dependencies_parsed_at":"2022-12-02T10:54:17.858Z","dependency_job_id":null,"html_url":"https://github.com/jkolb/Jasoom","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkolb%2FJasoom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkolb%2FJasoom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkolb%2FJasoom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkolb%2FJasoom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkolb","download_url":"https://codeload.github.com/jkolb/Jasoom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247428098,"owners_count":20937407,"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":[],"created_at":"2024-10-31T19:12:39.230Z","updated_at":"2025-04-06T03:23:22.233Z","avatar_url":"https://github.com/jkolb.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jasoom 1.0.0\n\n#### An easy to use, type safe, Swift wrapper for NSJSONSerialization\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n## Parsing JSON\n\n    do {\n        let json = try JSON.parseData(data)\n\t\t\n\t\tif json[\"name\"].isUndefined {\n\t\t\tthrow .MissingName\n\t\t}\n\t\t\n        if json[\"info\"][\"age\"].isUndefined {\n\t\t\tthrow .MissingAge\n\t\t}\n\t\t\n\t\tlet model = MyModel(\n\t\t\tname: json[\"name\"].stringValue!\n\t\t\tage: json[\"info\"][\"age\"].intValue!\n\t\t\tmarried: json[\"status\"][\"married\"].boolValue ?? false\n\t\t\tfirstCar: json[\"cars\"][0].stringValue ?? \"\"\n\t\t)\n\t}\n    catch {\n\t\t// Handle error\n    }\n\n## Generating JSON\n\n\tvar object = JSON.object()\n\tobject[\"name\"] = .String(\"Bob Smith\")\n\tobject[\"info\"] = JSON.object()\n\tobject[\"info\"][\"age\"] = .Number(10)\n\tobject[\"status\"] = JSON.object()\n\tobject[\"status\"][\"married\"] = .Number(true)\n\tobject[\"cars\"] = JSON.array()\n\tobject[\"cars\"].append(.String(\"Ford Mustang\"))\n    \n\tdo {\n\t\tlet data = try object.generateData()\n\t}\n\tcatch {\n\t\t// Handle error\n\t}\n\n## Contact\n\n[Justin Kolb](mailto:justin.kolb@franticapparatus.net)  \n[@nabobnick](https://twitter.com/nabobnick)\n\n## License\n\nJasoom is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkolb%2Fjasoom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkolb%2Fjasoom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkolb%2Fjasoom/lists"}