{"id":16085289,"url":"https://github.com/Insality/defold-parser","last_synced_at":"2025-10-23T02:30:25.183Z","repository":{"id":81026584,"uuid":"544500619","full_name":"Insality/defold-parser","owner":"Insality","description":"Node module to encode and decode Defold files","archived":false,"fork":false,"pushed_at":"2022-10-17T21:25:36.000Z","size":153,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T17:11:19.236Z","etag":null,"topics":["defold","npm","npm-package","parser"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Insality.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"insality","patreon":null,"open_collective":null,"ko_fi":"insality","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-10-02T16:32:21.000Z","updated_at":"2024-10-11T16:13:53.000Z","dependencies_parsed_at":"2023-03-23T10:36:05.255Z","dependency_job_id":null,"html_url":"https://github.com/Insality/defold-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insality%2Fdefold-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insality%2Fdefold-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insality%2Fdefold-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Insality%2Fdefold-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Insality","download_url":"https://codeload.github.com/Insality/defold-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237763855,"owners_count":19362310,"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":["defold","npm","npm-package","parser"],"created_at":"2024-10-09T13:01:54.486Z","updated_at":"2025-10-23T02:30:19.853Z","avatar_url":"https://github.com/Insality.png","language":"JavaScript","funding_links":["https://github.com/sponsors/insality","https://ko-fi.com/insality","https://www.buymeacoffee.com/insality"],"categories":["Libraries"],"sub_categories":["Programming Language"],"readme":"![](logo_defold_parser.png)\n[![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge\u0026logo=GitHub-Sponsors\u0026logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge\u0026logo=ko-fi\u0026logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge\u0026logo=buy-me-a-coffee\u0026logoColor=black)](https://www.buymeacoffee.com/insality)\n\n[![CI/CD](https://github.com/Insality/defold-parser/actions/workflows/node.js.yml/badge.svg)](https://github.com/Insality/defold-parser/actions/workflows/node.js.yml)\n[![npm](https://img.shields.io/npm/v/defold-parser?label=defold-parser)](https://www.npmjs.com/package/defold-parser)\n\n**Defold Parser** - node module to encode and decode [**Defold**](https://defold.com/) files.\n\n\n## Install\nTo install **[defold-parser](https://www.npmjs.com/package/defold-parser)** use [`npm`](https://docs.npmjs.com/).\n```bash\nnpm install --save defold-parser\n```\n\nFor update **defold-parser** you can use\n```bash\nnpm update --save defold-parser\n```\n\n## Usage\n\nAdd require line to your `.js` script:\n```js\nconst defold_parser = require(\"defold-parser\")\n```\nAll available API is:\n```js\n// Parse any Defold file (go, gui, collection, particlefx, etc)\nlet object = defold_parser.load_from_file([path_to_defold_file])\n\n// Save object to the Defold format\ndefold_parser.save_to_file([path_to_file], [object])\n\n// You can pass text string directly\nlet object = defold_parser.decode_object([defold_text_string])\n\n// And get Defold encoded text directly too\nlet defold_text_string = defold_parser.encode_object([js_object])\n```\n\nEvery Defold parsed struct is array, even for single fields. To access any field you should access it on first array index. For example:\n\n```js\nlet parsed_collection = defold_parser.load_from_file(\"./tests/files/collection.collection\")\nlet instance = parsed_collection.embedded_instances[0]\n\nassert(instance.id[0] == \"tile\")\nassert(inner_component.id[0] = \"sprite\")\nassert(inner_component.type[0] = \"sprite\")\n```\n\nTo know, which fields you wanna edit, see the file struct you parsing or just use `console.log` in development :smile:\n\n## License\n\n- Developed and supported by [Insality](https://github.com/Insality)\n\n\n## Issues and suggestions\n\nIf you have any issues, questions or suggestions please [create an issue](https://github.com/Insality/defold-parser/issues) or contact me: [insality@gmail.com](mailto:insality@gmail.com)\n\n\n## ❤️ Support project ❤️\n\nPlease support me if you like this project! It will help me keep engaged to update this project.\n\n[![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge\u0026logo=GitHub-Sponsors\u0026logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge\u0026logo=ko-fi\u0026logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge\u0026logo=buy-me-a-coffee\u0026logoColor=black)](https://www.buymeacoffee.com/insality)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInsality%2Fdefold-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FInsality%2Fdefold-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInsality%2Fdefold-parser/lists"}