{"id":20102565,"url":"https://github.com/entrlcom/go-http-request-body-json-decoder","last_synced_at":"2025-04-07T05:28:32.321Z","repository":{"id":243993172,"uuid":"813818560","full_name":"entrlcom/go-http-request-body-json-decoder","owner":"entrlcom","description":"HTTP request body JSON decoder","archived":false,"fork":false,"pushed_at":"2024-06-12T07:13:52.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-13T09:47:51.116Z","etag":null,"topics":["go","golang","http","http-request","json","request-body","security"],"latest_commit_sha":null,"homepage":"","language":"Go","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/entrlcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-06-11T19:59:30.000Z","updated_at":"2024-06-12T09:34:49.000Z","dependencies_parsed_at":"2024-06-14T15:33:12.648Z","dependency_job_id":null,"html_url":"https://github.com/entrlcom/go-http-request-body-json-decoder","commit_stats":null,"previous_names":["entrlcom/go-http-request-body-json-decoder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrlcom%2Fgo-http-request-body-json-decoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrlcom%2Fgo-http-request-body-json-decoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrlcom%2Fgo-http-request-body-json-decoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrlcom%2Fgo-http-request-body-json-decoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entrlcom","download_url":"https://codeload.github.com/entrlcom/go-http-request-body-json-decoder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247599168,"owners_count":20964585,"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":["go","golang","http","http-request","json","request-body","security"],"created_at":"2024-11-13T17:31:47.150Z","updated_at":"2025-04-07T05:28:32.292Z","avatar_url":"https://github.com/entrlcom.png","language":"Go","readme":"# HTTP request body JSON decoder\n\n## Table of Content\n\n- [Examples](#examples)\n- [License](#license)\n\n## Examples\n\n```go\npackage main\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"entrlcom.dev/http-request-body-json-decoder\"\n)\n\nconst maxBytes = 1 \u003c\u003c (10 * 1) * 2 // 2 KiB.\n\ntype Request struct {\n\tDateOfBirth time.Time `json:\"date_of_birth\"`\n\tEmail       string    `json:\"email\"`\n\tName        string    `json:\"name\"`\n\tPassword    string    `json:\"password\"`\n}\n\nfunc Handle(w http.ResponseWriter, r *http.Request) {\n\tvar request Request\n\n\t// Decode HTTP request body to struct.\n\tif err := http_request_body_json_decoder.Decode(w, r, \u0026request, maxBytes); err != nil {\n\t\t// TODO: Handle error.\n\t\treturn\n\t}\n\n\t// ...\n}\n\n```\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentrlcom%2Fgo-http-request-body-json-decoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentrlcom%2Fgo-http-request-body-json-decoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentrlcom%2Fgo-http-request-body-json-decoder/lists"}