{"id":16375805,"url":"https://github.com/golopot/vv","last_synced_at":"2026-01-11T23:58:47.011Z","repository":{"id":71417853,"uuid":"264881554","full_name":"golopot/vv","owner":"golopot","description":"A JSON validation library.","archived":false,"fork":false,"pushed_at":"2021-01-04T08:25:20.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T02:54:28.194Z","etag":null,"topics":["go","json","validation"],"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/golopot.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":"2020-05-18T08:49:10.000Z","updated_at":"2021-01-09T09:13:24.000Z","dependencies_parsed_at":"2023-04-24T19:25:32.049Z","dependency_job_id":null,"html_url":"https://github.com/golopot/vv","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golopot%2Fvv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golopot%2Fvv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golopot%2Fvv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golopot%2Fvv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golopot","download_url":"https://codeload.github.com/golopot/vv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239958275,"owners_count":19724924,"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","json","validation"],"created_at":"2024-10-11T03:22:15.543Z","updated_at":"2025-02-21T04:41:26.450Z","avatar_url":"https://github.com/golopot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VV\n\n[![GoDoc](https://pkg.go.dev/badge/github.com/golopot/vv)](https://pkg.go.dev/github.com/golopot/vv)\n\nA json validation library.\n\n- Get json value and validate json at the same time.\n- Concise usage.\n- Practical error handling.\n- Customizable error message.\n\n## Features\n\n- Optional fields and default value\n- Disallow extra object fields\n- User defined validators\n- Customizable error message\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/golopot/vv\"\n)\n\nfunc main() {\n\tv := vv.New([]byte(`\n{\n\t\"a\": 1,\n\t\"b\": \"sss\"\n}\n`))\n\n    a := v.Int(\"a\").Done()\n\tz := v.String(\"z\").Default(\"some-string\").Done() // `z` is optional\n\twrong := v.Int(\"wrong\").Done() // fails validation\n\n\tfmt.Println(a, z, wrong) // 1 \"some-string\" 0\n\n\t// v.ValidationError() stores the first error occured\n\tif err := v.ValidationError(); err != nil {\n        fmt.Println(\"error:\", err)\n        // error: property `wrong` should be int\n\t\treturn\n\t}\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolopot%2Fvv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolopot%2Fvv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolopot%2Fvv/lists"}