{"id":20110635,"url":"https://github.com/deepch/config","last_synced_at":"2026-05-16T13:03:31.169Z","repository":{"id":104209415,"uuid":"89109628","full_name":"deepch/config","owner":"deepch","description":"json config","archived":false,"fork":false,"pushed_at":"2017-09-10T18:17:39.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-21T21:53:53.259Z","etag":null,"topics":["config","go","golang","json"],"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/deepch.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":"2017-04-23T01:24:42.000Z","updated_at":"2019-02-14T20:26:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e7bb85e-460f-4352-af2a-50483c9e2121","html_url":"https://github.com/deepch/config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deepch/config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepch%2Fconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepch%2Fconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepch%2Fconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepch%2Fconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepch","download_url":"https://codeload.github.com/deepch/config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepch%2Fconfig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33103970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"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":["config","go","golang","json"],"created_at":"2024-11-13T18:12:49.427Z","updated_at":"2026-05-16T13:03:31.145Z","avatar_url":"https://github.com/deepch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## JSON config parser and encoder for Go\n\nInstallation:\n\n```bash\ngo get github.com/deepch/config\n```\n\n### Examples\n\nThis package works `JSON`.\n\nFor the simplest example, consider some JSON file as just a list of keys\nand values:\n\n```json\n{\n  \"Age\": 25,\n  \"Cats\": [\n    \"Cauchy\",\n    \"Plato\"\n  ],\n  \"Pi\": 3.14,\n  \"Perfection\": [\n    6,\n    28,\n    496,\n    8128\n  ],\n  \"DOB\": \"1987-07-05T05:45:00.000Z\"\n}\n```\n\nWhich could be defined in Go as:\n\n```go\ntype Config struct {\n  Age int\n  Cats []string\n  Pi float64\n  Perfection []int\n  DOB time.Time // requires `import time`\n}\n```\n\nAnd then decoded with:\n\n```go\nvar conf Config\nif _, err := config.Decode(jsonFileString, \u0026conf); err != nil {\n  // handle error\n}\n```\n\nAnd then encode with:\n\n```go\nif _, err := config.Encode(jsonFileString, \u0026conf); err != nil {\n  // handle error\n}\n```\n\nYou can also use struct tags if your struct field name doesn't map to a JSON\nkey value directly:\n\n```json\nsome_key_NAME = \"wat\"\n```\n\n```go\ntype json struct {\n  ObscureKey string `json:\"some_key_NAME\"`\n}\n```\n\nYou can use omitempty\n\n```go\ntype json struct {\n  ObscureKey string `json:\"some_key_NAME,omitempty\"`\n}\n```\n\nIf use omitempty and Encode not save zero 0 (defoult) data\n\nYou can line and char error \n```bash\nDecode Config Syntax Error File config/file.conf \nLine 5 Char 1 Error invalid character '1' looking for beginning of object key string\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepch%2Fconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepch%2Fconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepch%2Fconfig/lists"}