{"id":20642148,"url":"https://github.com/wwcd/csv2json","last_synced_at":"2025-03-09T13:09:01.573Z","repository":{"id":144232450,"uuid":"284297404","full_name":"wwcd/csv2json","owner":"wwcd","description":"csv2json","archived":false,"fork":false,"pushed_at":"2020-08-01T16:31:07.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-21T20:13:30.288Z","etag":null,"topics":["csv2json","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/wwcd.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":"2020-08-01T16:30:38.000Z","updated_at":"2024-06-19T08:57:47.656Z","dependencies_parsed_at":"2024-06-19T08:57:45.507Z","dependency_job_id":"1b2b5f33-2140-4298-991a-96ac134634bd","html_url":"https://github.com/wwcd/csv2json","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwcd%2Fcsv2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwcd%2Fcsv2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwcd%2Fcsv2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wwcd%2Fcsv2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wwcd","download_url":"https://codeload.github.com/wwcd/csv2json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242692393,"owners_count":20170231,"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":["csv2json","golang"],"created_at":"2024-11-16T16:08:14.316Z","updated_at":"2025-03-09T13:09:01.389Z","avatar_url":"https://github.com/wwcd.png","language":"Go","readme":"### CSV2JSON\n\n#### Cmd Usage \n\n```txt\n❯ cat input.csv\nh1,h2,h3,h4\na,b,c,d\naa,bb,cc,dd\naaa,bbb,ccc,ddd\naaaa,bbbb,cccc,dddd\naaaaa,bbbbb,ccccc,ddddd\n\n❯ ./csv2json input.csv --from-col=1 --to-col=2 --from-row=1 --to-row=2 | jq .\n[\n  {\n    \"h2\": \"b\",\n    \"h3\": \"c\"\n  },\n  {\n    \"h2\": \"bb\",\n    \"h3\": \"cc\"\n  }\n]\n```\n\n---\n#### Lib Usage\n\n```go\n\tinput := `h1,h2,h3,h4\na,b,c,d\naa,bb,cc,dd\naaa,bbb,ccc,ddd\naaaa,bbbb,cccc,dddd\naaaaa,bbbbb,ccccc,ddddd`\n\n    output := \u0026bytes.Buffer{}\n\n    err := csv2json.Conv(bytes.NewBufferString(input), output, With(1,2), WithRow(2,3))\n    if err != nil {\n        panic(err)\n    }\n\n    // OUTPUT: [{\"h2\":\"bb\",\"h3\":\"cc\"},{\"h2\":\"bbb\",\"h3\":\"ccc\"}] \n    fmt.Println(output.String())\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwwcd%2Fcsv2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwwcd%2Fcsv2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwwcd%2Fcsv2json/lists"}