{"id":22878576,"url":"https://github.com/scblur869/csv-2-json","last_synced_at":"2026-05-01T09:32:12.287Z","repository":{"id":149838902,"uuid":"350481066","full_name":"scblur869/csv-2-json","owner":"scblur869","description":"an API written in Go that reads a CSV file and sends a json response","archived":false,"fork":false,"pushed_at":"2021-06-17T17:24:48.000Z","size":2615,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T14:30:41.043Z","etag":null,"topics":["api","csv","gin-gonic","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/scblur869.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-03-22T20:32:27.000Z","updated_at":"2021-12-06T14:46:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"b70cd8bc-e3e0-4887-ba52-5963537a3906","html_url":"https://github.com/scblur869/csv-2-json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scblur869/csv-2-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scblur869%2Fcsv-2-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scblur869%2Fcsv-2-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scblur869%2Fcsv-2-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scblur869%2Fcsv-2-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scblur869","download_url":"https://codeload.github.com/scblur869/csv-2-json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scblur869%2Fcsv-2-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["api","csv","gin-gonic","golang"],"created_at":"2024-12-13T16:29:50.568Z","updated_at":"2026-05-01T09:32:12.269Z","avatar_url":"https://github.com/scblur869.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSV 2 JSON\n\n## This is just a simple API written in GO that reads a standard CSV file with the first row as a the header\n\n### once read, an http json response is sent back to the client with the CSV data in json format. One of the beauties of Go is the use map[string]interface{} or just the ability to use an empty interface for arbitrary data\n\nyou can just hold everything in a simple struct\n\n```go\ntype CSVData struct {\n Header []string                 `json:\"header\"`\n Rows   []map[string]interface{} `json:\"data\"`\n}\n```\n\nSingle Endpoint\n\n```bash\nPOST   /api/v1/upload\nmultipart/form-data;\n```\n\n\n\n### example\n\n### CSV File\n\n```console\n\"Code\",\"Name\",\"Category\",\"Quantity\"\n\"f230fh0g3\",\"Bamboo Watch\",\"Accessories\",\"24\"\n\"nvklal433\",\"Black Watch\",\"Accessories\",\"61\"\n\"zz21cz3c1\",\"Blue Band\",\"Fitness\",\"2\"\n\"244wgerg2\",\"Blue T-Shirt\",\"Clothing\",\"25\"\n\"h456wer53\",\"Bracelet\",\"Accessories\",\"73\"\n\"av2231fwg\",\"Brown Purse\",\"Accessories\",\"0\"\n\"bib36pfvm\",\"Chakra Bracelet\",\"Accessories\",\"5\"\n\"mbvjkgip5\",\"Galaxy Earrings\",\"Accessories\",\"23\"\n\"vbb124btr\",\"Game Controller\",\"Electronics\",\"2\"\n\"cm230f032\",\"Gaming Set\",\"Electronics\",\"63\"\n```\n\n### JSON response\n\n```json\n{\n    \"header\": [\n        \"Code\",\n        \"Name\",\n        \"Category\",\n        \"Quantity\"\n    ],\n    \"data\": [\n        {\n            \"Category\": \"Accessories\",\n            \"Code\": \"f230fh0g3\",\n            \"Name\": \"Bamboo Watch\",\n            \"Quantity\": \"24\"\n        },\n        {\n            \"Category\": \"Accessories\",\n            \"Code\": \"nvklal433\",\n            \"Name\": \"Black Watch\",\n            \"Quantity\": \"61\"\n        },\n        {\n            \"Category\": \"Fitness\",\n            \"Code\": \"zz21cz3c1\",\n            \"Name\": \"Blue Band\",\n            \"Quantity\": \"2\"\n        },\n        {\n            \"Category\": \"Clothing\",\n            \"Code\": \"244wgerg2\",\n            \"Name\": \"Blue T-Shirt\",\n            \"Quantity\": \"25\"\n        },\n        {\n            \"Category\": \"Accessories\",\n            \"Code\": \"h456wer53\",\n            \"Name\": \"Bracelet\",\n            \"Quantity\": \"73\"\n        },\n        {\n            \"Category\": \"Accessories\",\n            \"Code\": \"av2231fwg\",\n            \"Name\": \"Brown Purse\",\n            \"Quantity\": \"0\"\n        },\n        {\n            \"Category\": \"Accessories\",\n            \"Code\": \"bib36pfvm\",\n            \"Name\": \"Chakra Bracelet\",\n            \"Quantity\": \"5\"\n        },\n        {\n            \"Category\": \"Accessories\",\n            \"Code\": \"mbvjkgip5\",\n            \"Name\": \"Galaxy Earrings\",\n            \"Quantity\": \"23\"\n        },\n        {\n            \"Category\": \"Electronics\",\n            \"Code\": \"vbb124btr\",\n            \"Name\": \"Game Controller\",\n            \"Quantity\": \"2\"\n        },\n        {\n            \"Category\": \"Electronics\",\n            \"Code\": \"cm230f032\",\n            \"Name\": \"Gaming Set\",\n            \"Quantity\": \"63\"\n        }\n    ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscblur869%2Fcsv-2-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscblur869%2Fcsv-2-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscblur869%2Fcsv-2-json/lists"}