{"id":19046525,"url":"https://github.com/efishery/json-reactform","last_synced_at":"2025-08-25T07:37:30.267Z","repository":{"id":42955269,"uuid":"233001926","full_name":"eFishery/json-reactform","owner":"eFishery","description":"Convert JSON schema into React component forms.","archived":false,"fork":false,"pushed_at":"2023-01-05T04:59:03.000Z","size":241,"stargazers_count":10,"open_issues_count":16,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-20T17:16:36.192Z","etag":null,"topics":["form","generator","json","json-schema","react-components","reactjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eFishery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-10T08:32:31.000Z","updated_at":"2023-11-15T00:23:11.000Z","dependencies_parsed_at":"2023-02-03T11:16:52.508Z","dependency_job_id":null,"html_url":"https://github.com/eFishery/json-reactform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eFishery/json-reactform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eFishery%2Fjson-reactform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eFishery%2Fjson-reactform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eFishery%2Fjson-reactform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eFishery%2Fjson-reactform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eFishery","download_url":"https://codeload.github.com/eFishery/json-reactform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eFishery%2Fjson-reactform/sbom","scorecard":{"id":363245,"data":{"date":"2025-08-11","repo":{"name":"github.com/eFishery/json-reactform","commit":"74705891ba78a5055d8f5d33abe61e3a4cf865ae"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.6,"checks":[{"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":"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":"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":"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":"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":"Code-Review","score":2,"reason":"Found 5/21 approved changesets -- score normalized to 2","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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"27 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-vc8w-jr9v-vj7f","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-18T11:17:18.558Z","repository_id":42955269,"created_at":"2025-08-18T11:17:18.558Z","updated_at":"2025-08-18T11:17:18.558Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272025084,"owners_count":24860528,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["form","generator","json","json-schema","react-components","reactjs"],"created_at":"2024-11-08T22:55:15.446Z","updated_at":"2025-08-25T07:37:30.238Z","avatar_url":"https://github.com/eFishery.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/json-reactform)](https://www.npmjs.com/package/json-reactform)\n![npm bundle size](https://img.shields.io/bundlephobia/min/json-reactform)\n![GitHub contributors](https://img.shields.io/github/contributors-anon/efishery/json-reactform)\n![NPM](https://img.shields.io/npm/l/json-reactform)\n\n# JSON-ReactForm\n\nJSON React Form is library that convert JSON schema into React component forms.\n\n## Supported form's types\n\n- text\n- number\n- textarea\n- date\n- select\n- checkbox\n- radio\n- currency\n- submit button\n\n## How To Use\n\nInstall this library using `npm i json-reactform` or `yarn add json-reactform`.\n\n## JSON Schema\n\nThen define JSON schema with format:\n\n```\n[label_name] : {\n    options\n}\n```\n\n## Options\n\n### Text, Number, Textarea --\u003e `return string`\n\n- **type**: text | number | textarea\n- **required**: true | false\n- **disabled**: true | false\n- **defaultValue**: string\n- **placeholder**: string\n\n### Date --\u003e `return ISO string`\n\nWe use react-datepicker for rendering input type date.\n\n- **type**: date\n- **required**: true | false\n- **disabled**: true | false\n- **defaultValue**: new Date()\n  \u003e example: `new Date()` for today or more specific with a certain date and time `new Date(\"11 July 2020\")`\n- **format**: string\n  \u003e example: `dd MM yyyy` or `MMMM dd, yyyy`.\n  \u003e\n  \u003e See react-datepicker custom format.\n\n### Select --\u003e `return string (value of selected)`\n\nWe use react-select for rendering input type select and its options. By default you can search option by typing in the field and you can clear the options by click on **x** button on the right side.\n\n- **type**: select\n- **required**: true | false\n- **disabled**: true | false\n- **defaultValue**: string\n  \u003e It must be the exact same string that representing the option you wanna set as default options.\n- **placeholder**: string\n- **createable**: true | false\n  \u003e Set to `true` if you want to add option on the fly. Simply by typing new options on the input field. The value you typed in will become the `label` of the new option object. You must provide the function to define your `value` based on that string within `onCreateOption` below.\n- **onCreateOption**: callback\n\n  \u003e The callback will receive string you've typed in the input field. Then you must return an object that at lest contain `label` and `value`. Example:\n  \u003e\n  \u003e ```js\n  \u003e {\n  \u003e   onCreateOption: text =\u003e {\n  \u003e     const value = text.toLowerCase();\n  \u003e     return {\n  \u003e       label: text,\n  \u003e       value,\n  \u003e     };\n  \u003e   };\n  \u003e }\n  \u003e ```\n\n- **options**: array\n  \u003e The options is array of object that consists at least `label` and `value`. Label will be displayed in the select's options, while value is the one that will be returned later.\n\n### Checkbox --\u003e `return array of string`\n\n- **type**: checkbox\n- **required**: true | false\n- **disabled**: true | false\n- **defaultValue**: array of string\n  \u003e It must be an array consisting the exact same string that representing the option you want to be set as checked by default.\n- **options**: array\n  \u003e The options is array of object that consists at least `label` and `value`. Label will be displayed in options, while value is the one that will be returned later.\n\n### Radio --\u003e `return string`\n\n- **type**: radio\n- **required**: true | false\n- **disabled**: true | false\n- **defaultValue**: string\n  \u003e It must be the exact same string that representing the option you want to be set as checked by default.\n- **options**: array\n  \u003e The options is array of object that consists at least `label` and `value`. Label will be displayed in options, while value is the one that will be returned later.\n\n### Submit\n\nThe key you provided to the model will become text inside this submit button.\n\n- **type**: submit\n- **disabled**: true | false\n\n## Example\n\n```\nexport default {\n  \"Plan Date\": {\n    \"type\": \"date\",\n    \"format\": \"dd MMMM yyyy\",\n    \"required\": true\n  },\n  \"Qty\": {\n    \"type\": \"number\",\n    \"required\": true\n  },\n  \"Item Number\": {\n    \"type\": \"select\",\n    \"required\": true\n    \"options\": [ //use static json arry to get options\n      {\n        \"value\": \"1\",\n        \"label\": \"item 1\"\n      },\n      {\n        \"value\": \"2\",\n        \"label\": \"item 2\"\n      }\n    ],\n  },\n  \"Parts\": {\n    \"type\": \"checkbox\",\n    \"required\": true\n    \"options\": [ //use static json arry to get options\n      {\n        \"value\": \"checkbox_item_1\",\n        \"label\": \"Checkbox 1\"\n      },\n      {\n        \"value\": \"checkbox_item_2\",\n        \"label\": \"Checkbox 2\"\n      }\n    ],\n  },\n  \"Status\": {\n    \"type\": \"radio\",\n    \"required\": true,\n    \"options\": [ //use static json arry to get options\n      {\n        \"value\": \"completed\",\n        \"label\": \"Completed\"\n      },\n      {\n        \"value\": \"not_completed\",\n        \"label\": \"Not Completed\"\n      }\n    ],\n  },\n  \"Save\": { // button submit\n    \"type\": \"submit\",\n  }\n}\n```\n\nDon't forget to include css bootstrap into your project.\n\n```\nimport 'bootstrap/dist/css/bootstrap.min.css';\n```\n\nWithin the component you want to add the form, import `JsonToForm` from library and your schema, make your submit function inside your component.\n\n```\nimport JsonToForm from 'json-reactform';\nimport model from '../your/schema';\n\nconst YourComponent = () =\u003e {\n  // Do anything within submit function.\n  const submit = (params) =\u003e {\n    console.log(params);\n  }\n\n  return (\n    \u003cdiv\u003e\n      \u003cJsonToForm model={model} onSubmit={submit}/\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n## peerDependecies\n\nMake sure you have these npm libraries installed within your project.\n\n- react\n\n## Contributor\n\n- [Aji Agahari](https://github.com/ajiagahari)\n- [Nasrul Faizin](https://github.com/nasrul21)\n- [Yuhanas Yulianto](https://github.com/yuhanasy)\n\n## Credits\n\n[reactjs](https://reactjs.org/)\n[reactstrap](https://reactstrap.github.io/)\n[axios](https://github.com/axios/axios)\n[react-datepicker](https://github.com/Hacker0x01/react-datepicker)\n[react-select](https://react-select.com/)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefishery%2Fjson-reactform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefishery%2Fjson-reactform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefishery%2Fjson-reactform/lists"}