{"id":15062118,"url":"https://github.com/sanmak/json-to-kotlin-class","last_synced_at":"2026-03-10T15:32:37.430Z","repository":{"id":48664543,"uuid":"320256395","full_name":"sanmak/json-to-kotlin-class","owner":"sanmak","description":"JSON to Kotlin Class","archived":false,"fork":false,"pushed_at":"2021-07-15T08:07:22.000Z","size":62,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T02:51:31.805Z","etag":null,"topics":["data-class","javascript","javascript-library","json","json-2-kotlin","json-conversion","json-converter","json-convertor","json-to-kotlin","json-transform","json-transformation","json2kotlin","jsontokotlin","kotlin","kotlin-js","mocha","mocha-chai","mocha-tests","transform","transformer"],"latest_commit_sha":null,"homepage":"https://boxpiper.com/","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/sanmak.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},"funding":{"ko_fi":"boxpiper"}},"created_at":"2020-12-10T11:49:21.000Z","updated_at":"2023-03-07T14:43:35.000Z","dependencies_parsed_at":"2022-09-14T12:51:15.797Z","dependency_job_id":null,"html_url":"https://github.com/sanmak/json-to-kotlin-class","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sanmak/json-to-kotlin-class","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanmak%2Fjson-to-kotlin-class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanmak%2Fjson-to-kotlin-class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanmak%2Fjson-to-kotlin-class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanmak%2Fjson-to-kotlin-class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanmak","download_url":"https://codeload.github.com/sanmak/json-to-kotlin-class/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanmak%2Fjson-to-kotlin-class/sbom","scorecard":{"id":799779,"data":{"date":"2025-08-11","repo":{"name":"github.com/sanmak/json-to-kotlin-class","commit":"c5d050c0193f891a575bd9a5e0c90d55de27925c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T10:06:31.833Z","repository_id":48664543,"created_at":"2025-08-23T10:06:31.833Z","updated_at":"2025-08-23T10:06:31.833Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30340117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:03:31.997Z","status":"ssl_error","status_checked_at":"2026-03-10T15:01:30.431Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["data-class","javascript","javascript-library","json","json-2-kotlin","json-conversion","json-converter","json-convertor","json-to-kotlin","json-transform","json-transformation","json2kotlin","jsontokotlin","kotlin","kotlin-js","mocha","mocha-chai","mocha-tests","transform","transformer"],"created_at":"2024-09-24T23:30:36.144Z","updated_at":"2026-03-10T15:32:37.395Z","avatar_url":"https://github.com/sanmak.png","language":"JavaScript","funding_links":["https://ko-fi.com/boxpiper","https://ko-fi.com/E1E72C2MM"],"categories":[],"sub_categories":[],"readme":"# json-to-kotlin-class\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nodei.co/npm/json-to-kotlin-class/\" target=\"_blank\"\u003e\u003cimg src=\"https://nodei.co/npm/json-to-kotlin-class.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n\n  \u003ch3 align=\"center\"\u003eJSON to Kotlin Class\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    Raw javascript to convert JSON to Kotlin Class\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/sanmak/json-to-kotlin-class\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    ·\n    \u003ca href=\"https://github.com/sanmak/json-to-kotlin-class/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/sanmak/json-to-kotlin-class/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## Dead Simple to Use\n\n```javascript\n# Import Package\nconst jsonToKotlinClass = require(\"json-to-kotlin-class\");\n\n# Your JSON\nconst json = { key: \"value\" };\n\n# Call init function to initiate conversion\nconsole.log(jsonToKotlinClass.init(json));\n```\n## Resultant: A Kotlin Data Class\n\n```Kotlin\ndata class JsonToKotlinMain (val key: String, )\n```\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails open=\"open\"\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eSponsor\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Package\n\nThis package is created to generate respective Kotlin Class from a given JSON.\n\n### Built With\n\nThis package is built with raw javascript and Mocha / Chai is used for testing.\n\n* [Javascript](https://www.javascript.com/)\n* [Mocha](https://mochajs.org/)\n* [Chai](https://www.chaijs.com/)\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nInstall this package and follow examples given below. We have `examples` folder which has implementation code as well.\n### Installation\n\n1. Install NPM packages\n   ```sh\n   npm i --save json-to-kotlin-class\n   ```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\nOnce this package is added in your project as mentioned in the `installation`, you need to import this package and call `init` function to initiate conversion.\n\n## Eg: \n\n```javascript\n# Import Package\nconst jsonToKotlinClass = require(\"json-to-kotlin-class\");\n\n# Your JSON\nconst json = { key: \"value\" };\n\n# Call init function to initiate conversion\nconsole.log(jsonToKotlinClass.init(json));\n```\n## Resultant: A Kotlin Data Class\n\n```Kotlin\ndata class JsonToKotlinMain (val key: String, )\n```\n\n### INPUT: JSON\n\n```json\n{\n  \"string\": \"string\",\n  \"char\": \"c\",\n  \"int\": 123456,\n  \"double\": 2020.2,\n  \"boolean\": true,\n  \"array\": [1, 2, 2020.2],\n};\n```\n\n### OUTPUT: Kotin Class\n\n```Kotlin\ndata class JsonToKotlinMain (val string: String, val char: Char, val int: Int, val double: Double, val boolean: Boolean, val array: Array\u003cDouble\u003e, )\n```\n\n## Test\n\nTest cases is written in `test/test.js`. To test this package, run `npm run test`. \n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\nSee the [open issues](https://github.com/sanmak/json-to-kotlin-class/issues) for a list of proposed features (and known issues).\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nSANKET MAKHIJA - [@sanket_dude](https://twitter.com/sanket_dude) - sanket[dot]mahija[at]gmail[dot]com\n\n## Sponsor ❤️\n\nConsider sponsoring this package and help open source community and contributions.\n\n \u003ca href=\"https://ko-fi.com/E1E72C2MM\" target=\"_blank\"\u003e \u003cimg style={kofiStyle} src=\"https://cdn.ko-fi.com/cdn/kofi1.png?v=2\"\u003e\u003c/img\u003e \u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanmak%2Fjson-to-kotlin-class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanmak%2Fjson-to-kotlin-class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanmak%2Fjson-to-kotlin-class/lists"}