{"id":15481580,"url":"https://github.com/danielmschmidt/objective-c-parser","last_synced_at":"2025-07-26T13:02:25.039Z","repository":{"id":39581708,"uuid":"94248072","full_name":"DanielMSchmidt/objective-c-parser","owner":"DanielMSchmidt","description":"Get the JSON representation of an Objective-C header file","archived":false,"fork":false,"pushed_at":"2024-09-19T03:14:57.000Z","size":2748,"stargazers_count":25,"open_issues_count":12,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T05:15:26.450Z","etag":null,"topics":["babel","code-generation","javascript","objective-c","parser"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/DanielMSchmidt.png","metadata":{"files":{"readme":"readme.md","changelog":"Changelog.md","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":"2017-06-13T19:06:45.000Z","updated_at":"2024-09-10T15:49:59.000Z","dependencies_parsed_at":"2023-10-16T10:49:26.888Z","dependency_job_id":"f02e0f15-529b-48e1-88c8-840100f2014b","html_url":"https://github.com/DanielMSchmidt/objective-c-parser","commit_stats":{"total_commits":421,"total_committers":10,"mean_commits":42.1,"dds":0.4228028503562945,"last_synced_commit":"0333007baff3220bde4e0123f2b5b5a979676a45"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMSchmidt%2Fobjective-c-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMSchmidt%2Fobjective-c-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMSchmidt%2Fobjective-c-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMSchmidt%2Fobjective-c-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielMSchmidt","download_url":"https://codeload.github.com/DanielMSchmidt/objective-c-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445927,"owners_count":18227060,"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":["babel","code-generation","javascript","objective-c","parser"],"created_at":"2024-10-02T05:05:00.280Z","updated_at":"2024-12-19T14:08:28.244Z","avatar_url":"https://github.com/DanielMSchmidt.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# objective-c-parser [![Build Status](https://travis-ci.org/DanielMSchmidt/objective-c-parser.svg?branch=master)](https://travis-ci.org/DanielMSchmidt/objective-c-parser) [![Coverage Status](https://coveralls.io/repos/github/DanielMSchmidt/objective-c-parser/badge.svg?branch=master)](https://coveralls.io/github/DanielMSchmidt/objective-c-parser?branch=master) [![BCH compliance](https://bettercodehub.com/edge/badge/DanielMSchmidt/objective-c-parser?branch=master)](https://bettercodehub.com/)\n\n\u003e Get an objective-c header file and translate it to equivalent javascript calls\n\n## Install\n\n```\n$ npm install objective-c-parser\n```\n\n## Usage\n\n```js\nconst fs = require(\"fs\");\nconst objectiveCParser = require(\"objective-c-parser\");\nconst content = fs.readFileSync(\"/path/to/objective-c/Ponies.h\", \"utf8\");\n\nconst output = objectiveCParser(content);\n\nfs.writeFileSync(\"/path/to/project/ponies.json\", JSON.stringify(output));\n```\n\n## Example\n\n```objective-c\n#import \u003cFoundation/Foundation.h\u003e\n@protocol Ponies, Foo;\n@interface BasicName : NSObject\n\n// Another comment\n@property(nonatomic, readonly) uninteresting\u003cIgnorePlease\u003e matcher;\n\n\n// This is the comment of basic method one\n- (NSInteger)basicMethodOne;\n\n/**\n *  This is the comment of basic method two.\n *  It has multiple lines\n */\n- (NSString *) basicMethodTwoWithArgOne:(NSInteger)argOne AndArgTwo:(NSString *)argTwo;\n@end\n```\n\n```json\n{\n\t\"name\": \"BasicName\",\n\t\"methods\": [\n\t\t{\n\t\t\t\"args\": [],\n\t\t\t\"comment\": \"This is the comment of basic method one\",\n\t\t\t\"name\": \"basicMethodOne\",\n\t\t\t\"returnType\": \"NSInteger\"\n\t\t},\n\t\t{\n\t\t\t\"args\": [\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"NSInteger\",\n\t\t\t\t\t\"name\": \"argOne\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"type\": \"NSString\",\n\t\t\t\t\t\"name\": \"argTwo\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"comment\": \"This is the comment of basic method two.\\nIt has multiple lines\",\n\t\t\t\"name\": \"basicMethodTwoWithArgOneAndArgTwo\",\n\t\t\t\"returnType\": \"NSString\"\n\t\t}\n\t]\n}\n```\n\nPlease be aware that `name` can be undefined if the headerfile does not contain an `@interface` declaration.\n\n## License\n\nMIT © [Daniel Schmidt](http://danielmschmidt.de)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmschmidt%2Fobjective-c-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielmschmidt%2Fobjective-c-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmschmidt%2Fobjective-c-parser/lists"}