{"id":13413280,"url":"https://github.com/dedalqq/omg.jsonparser","last_synced_at":"2026-01-12T12:48:53.118Z","repository":{"id":57616496,"uuid":"384275518","full_name":"dedalqq/omg.jsonparser","owner":"dedalqq","description":"The simple JSON parser with validation by condition","archived":false,"fork":false,"pushed_at":"2021-10-12T12:34:19.000Z","size":33,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T20:52:11.323Z","etag":null,"topics":["go","golang","json-parsing","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/dedalqq.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}},"created_at":"2021-07-08T23:59:21.000Z","updated_at":"2024-07-06T20:40:39.000Z","dependencies_parsed_at":"2022-08-27T08:21:55.177Z","dependency_job_id":null,"html_url":"https://github.com/dedalqq/omg.jsonparser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dedalqq/omg.jsonparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalqq%2Fomg.jsonparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalqq%2Fomg.jsonparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalqq%2Fomg.jsonparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalqq%2Fomg.jsonparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dedalqq","download_url":"https://codeload.github.com/dedalqq/omg.jsonparser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalqq%2Fomg.jsonparser/sbom","scorecard":{"id":331635,"data":{"date":"2025-08-11","repo":{"name":"github.com/dedalqq/omg.jsonparser","commit":"3224f2a275704f88f9a0068da7215dbd2a941d24"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/dedalqq/omg.jsonparser/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/dedalqq/omg.jsonparser/go.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/go.yml:29","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T03:47:10.994Z","repository_id":57616496,"created_at":"2025-08-18T03:47:10.994Z","updated_at":"2025-08-18T03:47:10.994Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["go","golang","json-parsing","validation"],"created_at":"2024-07-30T20:01:36.736Z","updated_at":"2026-01-12T12:48:53.100Z","avatar_url":"https://github.com/dedalqq.png","language":"Go","readme":"# omg.jsonParser\n\n[![Go](https://github.com/dedalqq/omg.jsonparser/actions/workflows/go.yml/badge.svg)](https://github.com/dedalqq/omg.jsonparser/actions/workflows/go.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/dedalqq/omg.jsonparser.svg)](https://pkg.go.dev/github.com/dedalqq/omg.jsonparser)\n[![Coverage Status](https://coveralls.io/repos/github/dedalqq/omg.jsonparser/badge.svg?branch=master)](https://coveralls.io/github/dedalqq/omg.jsonparser?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dedalqq/omg.jsonparser)](https://goreportcard.com/report/github.com/dedalqq/omg.jsonparser)\n\nomg.jsonParser is a simple JSON parser with a simple condition validation. It's a wrapper on standard go JSON lib. With it help you can add the validation condition via golang structure fields tags.\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/dedalqq/omg.jsonparser\"\n)\n\nfunc main() {\n\tjsonData := `{\"name\": \"\"}`\n\n\tst := struct {\n\t\tName string `json:\"name,notEmpty\"` // added notEmpty for enable validation for it field\n\t}{}\n\n\terr := jsonparser.Unmarshal([]byte(jsonData), \u0026st)\n\tif err != nil {\n\t\tfmt.Println(err.Error()) // print: value [name] must be not empty\n\t}\n}\n\n```\n\n## Tag struct\n\n```\njson:\"[name][,option]...\"\n```\n\n### Tag examples\n\nHere are some the tag examples:\n\n```go\npackage main\n\ntype data struct {\n    F1 string   `json:\"f1,notEmpty\"`          // the field must be not empty but can be \"null\" or may not exist\n    F2 string   `json:\"f2,notEmpty,required\"` // the field is required and must be not empty but may be the \"null\" value\n    F3 string   `json:\"f3,notEmpty,notNull\"`  // the field must be not empty and not \"null\" but may not exist\n    F4 []string `json:\"f4,notNull,min:3\"`     // the field must be not \"null\" and contains 3 or more items but may not exist\n}\n```\n\n## Available tags options\n\n| Name        | Types    | Description                                                                            |\n| ----------- | -------- | -------------------------------------------------------------------------------------- |\n| `required`  | any      | The field must be exist with any value or `null`                                       |\n| `notEmpty`  | any      | The field can be not exist but if exist value must be not zero value but can be `null` |\n| `notEmpty`  | slice    | The field must have one element or more but may be `null` or not exist                 |\n| `notNull`   | any      | The field should not be null, but may not exist                                        |\n| `uniq`      | []string | The strings slice must contains only unique strings                                    |\n| `min:n`     | slice    | The slice must have `n` items or more                                                  |\n| `max:n`     | slice    | The slice must have `n` items or less                                                  |\n| `min:n`     | string   | The string must have `n` runes or more                                                 |\n| `max:n`     | string   | The string must have `n` runes or less                                                 |\n| `min:n`     | int/uint | The value must be equals `n` or more                                                   |\n| `max:n`     | int/uint | The value must be equals `n` or less                                                   |\n","funding_links":[],"categories":["Relational Databases","JSON","Go"],"sub_categories":["Advanced Console UIs","Search and Analytic Databases","检索及分析资料库"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedalqq%2Fomg.jsonparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdedalqq%2Fomg.jsonparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedalqq%2Fomg.jsonparser/lists"}