{"id":19319720,"url":"https://github.com/hyperoslo/minced","last_synced_at":"2025-04-22T17:32:08.441Z","repository":{"id":28513266,"uuid":"32029902","full_name":"hyperoslo/Minced","owner":"hyperoslo","description":"Convert JSON keys to camelCase","archived":false,"fork":false,"pushed_at":"2015-04-18T14:10:40.000Z","size":416,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-10-12T23:34:36.980Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://hyper.no","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperoslo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-11T16:58:49.000Z","updated_at":"2016-11-08T10:55:48.000Z","dependencies_parsed_at":"2022-08-24T07:00:35.305Z","dependency_job_id":null,"html_url":"https://github.com/hyperoslo/Minced","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/hyperoslo%2FMinced","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2FMinced/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2FMinced/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2FMinced/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperoslo","download_url":"https://codeload.github.com/hyperoslo/Minced/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223902213,"owners_count":17222330,"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-11-10T01:24:57.836Z","updated_at":"2024-11-10T01:24:58.422Z","avatar_url":"https://github.com/hyperoslo.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minced\n\n[![CI Status](http://img.shields.io/travis/hyperoslo/Minced.svg?style=flat)](https://travis-ci.org/hyperoslo/Minced)\n[![Version](https://img.shields.io/cocoapods/v/Minced.svg?style=flat)](http://cocoadocs.org/docsets/Minced)\n[![License](https://img.shields.io/cocoapods/l/Minced.svg?style=flat)](http://cocoadocs.org/docsets/Minced)\n[![Platform](https://img.shields.io/cocoapods/p/Minced.svg?style=flat)](http://cocoadocs.org/docsets/Minced)\n\n\u003e Mincing is a food preparation technique in which food ingredients are finely divided into uniform pieces.\n\nMinced converts JSON keys to camelCase an adds support for replacement of JSON null values with empty strings.\n\nThis is especially useful as a workaround for avoiding crashes due to null values when using Realm. More info: [Issue #628](https://github.com/realm/realm-cocoa/issues/628)\n\n## Usage\n\n```objc\n// Converts all the keys in the JSON to camelCase\n- (id)minced_JSONKeys;\n- (NSArray *)minced_JSONObjectsKeys;\n- (NSDictionary *)minced_JSONObjectKeys;\n\n// Converts all the keys in the JSON to camelCase and replaces null values with an empty string\n- (id)minced_JSONKeysWithNonnulls;\n- (NSArray *)minced_JSONObjectsKeysWithNonnulls;\n- (NSDictionary *)minced_JSONObjectKeysWithNonnulls;\n```\n\n## Example\n\n#### JSON\n\n```json\n[\n  {\n    \"created_at\":null,\n    \"updated_at\":\"2015-03-11\",\n    \"window\":{\n      \"title\":null,\n      \"name\":\"hyper_window\"\n    }\n  },\n  {\n    \"created_at\":null,\n    \"updated_at\":\"2015-03-12\",\n    \"panel\":{\n      \"title\":null,\n      \"name\":\"hyper_panel\"\n    }\n  }\n]\n```\n\n#### Code\n\n```objc\nNSArray *mincedJSON = [JSON minced_JSONObjectsKeysWithNonnulls];\n\n// Realm\nRLMRealm *realm = [RLMRealm defaultRealm];\n[realm beginWriteTransaction];\n[self createOrUpdateInDefaultRealmWithObject:mincedJSON];\n[realm commitWriteTransaction];\n```\n\n#### Minced JSON\n\n```json\n[\n  {\n    \"createdAt\":\"\",\n    \"updatedAt\":\"2015-03-11\",\n    \"window\":{\n      \"title\":\"\",\n      \"name\":\"hyper_window\"\n    }\n  },\n  {\n    \"createdAt\":\"\",\n    \"updatedAt\":\"2015-03-12\",\n    \"panel\":{\n      \"title\":\"\",\n      \"name\":\"hyper_panel\"\n    }\n  }\n]\n```\n\n## Installation\n\n**Minced** is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n`pod 'Minced'`\n\n## Author\n\nHyper Interaktiv AS, teknologi@hyper.no\n\n## License\n\n**Minced** 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%2Fhyperoslo%2Fminced","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperoslo%2Fminced","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperoslo%2Fminced/lists"}