{"id":37149827,"url":"https://github.com/as/sanctify","last_synced_at":"2026-01-14T17:41:45.862Z","repository":{"id":57543143,"uuid":"112686409","full_name":"as/sanctify","owner":"as","description":"Transform JSON into idiomatic, stutter-free Go structs","archived":false,"fork":false,"pushed_at":"2023-05-03T02:34:49.000Z","size":122,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-19T01:47:07.141Z","etag":null,"topics":["etc","go","json","remove","snake-case","stuttering","to"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/as.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":"2017-12-01T02:40:41.000Z","updated_at":"2024-03-19T01:47:07.142Z","dependencies_parsed_at":"2022-09-26T18:31:29.627Z","dependency_job_id":null,"html_url":"https://github.com/as/sanctify","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/as/sanctify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as%2Fsanctify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as%2Fsanctify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as%2Fsanctify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as%2Fsanctify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/as","download_url":"https://codeload.github.com/as/sanctify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/as%2Fsanctify/sbom","scorecard":{"id":210595,"data":{"date":"2025-08-11","repo":{"name":"github.com/as/sanctify","commit":"d44f17b98deaf07b3582ae63a834713a774e2093"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":-1,"reason":"No tokens found","details":null,"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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: BSD 3-Clause \"New\" or \"Revised\" 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-17T00:42:42.768Z","repository_id":57543143,"created_at":"2025-08-17T00:42:42.769Z","updated_at":"2025-08-17T00:42:42.769Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"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":["etc","go","json","remove","snake-case","stuttering","to"],"created_at":"2026-01-14T17:41:44.691Z","updated_at":"2026-01-14T17:41:45.849Z","avatar_url":"https://github.com/as.png","language":"Go","readme":"## Sanctify\n\nConvert JSON data into a Go struct with idiomatic field names\n  \n## Synopsis\n\n`go get -u github.com/as/sanctify/...`\n\n`sanctify \u003c data.json`\n  \n## Description\n\nMuch of the work in creating a marshaller is in the tweaks that occur after the specification is\ncopied into Go source code. Because Go allows structs to have tags, you can keep the bad names in\nan already-established API specification out of the struct field names. This package is an executable\nthat reads JSON data and converts it into Go, but also takes the labor and guess work out of such decisions. \n\nIt uses the following process:\n\t\n- Marshal JSON into a Go interface{}\n- Recursively descend into arrays, amalagating fields of underlying JSON objects into a set\n- Parse the amalagate tree, generating basic Go source in a main package\n- Vet the package on the fly with golint, capturing naming suggestions in a buffer\n- Remove underscores in variable names\n- Capitalize letter occupying position of deleted underscores\n- Compile rules to correct improperly-punctuated acronyms in struct field names\n- Reparse the amalagate, applying corrections during the recursive descent step\n- Prefix compare child fields to parent fields, remove stuttercase naming in Go field names\n- Run gofmt -s to simplify code\n\nThen you:\n\n- Check the auto-generated code for consistency\n- Paste it into your project\n\n## Options\n\t\n\t-p    Package name to generate (default: main)\n\t-t    JSON root element type (default: X)\n\t-o    Add omitempty to all fields\n  \n\n## Why\n\n- Generates Go without adding third party dependencies.\n- Save time correcting huge datasets by hand\n\n## Example\n \n`echo {\"msg\":{\"msg_string\":\"hi\",\"msg_num\": 3}} | sanctify`\n   \n```\npackage main\ntype X struct {\n  Msg struct {\n    String string `json:\"msg_string\"`\n    Num    int    `json:\"msg_num\"`\n  } `json:\"msg\"`\n}\n```\n\n## Example 2\n\nThis hideous thing is straight from the json.org website. \n\n```\n{\"menu\": {\n    \"header\": \"SVG Viewer\",\n    \"items\": [\n        {\"id\": \"Open\"},\n        {\"id\": \"OpenNew\", \"label\": \"Open New\"},\n        null,\n        {\"id\": \"ZoomIn\", \"label\": \"Zoom In\"},\n        {\"id\": \"ZoomOut\", \"label\": \"Zoom Out\"},\n        {\"id\": \"OriginalView\", \"label\": \"Original View\"},\n        null,\n        {\"id\": \"Quality\"},\n        {\"id\": \"Pause\"},\n        {\"id\": \"Mute\"},\n        null,\n        {\"id\": \"Find\", \"label\": \"Find...\"},\n        {\"id\": \"FindAgain\", \"label\": \"Find Again\"},\n        {\"id\": \"Copy\"},\n        {\"id\": \"CopyAgain\", \"label\": \"Copy Again\"},\n        {\"id\": \"CopySVG\", \"label\": \"Copy SVG\"},\n        {\"id\": \"ViewSVG\", \"label\": \"View SVG\"},\n        {\"id\": \"ViewSource\", \"label\": \"View Source\"},\n        {\"id\": \"SaveAs\", \"label\": \"Save As\"},\n        null,\n        {\"id\": \"Help\"},\n        {\"id\": \"About\", \"label\": \"About Adobe CVG Viewer...\"}\n    ]\n}}\n```\n\n``` cat horridmonkey.json | sanctify```\n\n```\npackage main\n\ntype X struct {\n        Menu struct {\n                Header string `json:\"header\"`\n                Items  []struct {\n                        Id    string `json:\"id\"`\n                        Label string `json:\"label\"`\n                } `json:\"items\"`\n        } `json:\"menu\"`\n}\n```\n\n# Example 3\n\n```\ncurl https://api.github.com/repos/as/sanctify | sanctify\nhget https://api.github.com/repos/as/sanctify | sanctify\n```\n\n```\ntype X struct {\n        IssueEventsURL   string      `json:\"issue_events_url\"`\n        BlobsURL         string      `json:\"blobs_url\"`\n        CloneURL         string      `json:\"clone_url\"`\n        Description      string      `json:\"description\"`\n        CollaboratorsURL string      `json:\"collaborators_url\"`\n        TeamsURL         string      `json:\"teams_url\"`\n        ArchiveURL       string      `json:\"archive_url\"`\n        PushedAt         string      `json:\"pushed_at\"`\n        SubscribersCount int         `json:\"subscribers_count\"`\n        Watchers         int         `json:\"watchers\"`\n        Private          bool        `json:\"private\"`\n        HooksURL         string      `json:\"hooks_url\"`\n        LanguagesURL     string      `json:\"languages_url\"`\n        SubscribersURL   string      `json:\"subscribers_url\"`\n        HasPages         bool        `json:\"has_pages\"`\n        MirrorURL        interface{} `json:\"mirror_url\"`\n        Archived         bool        `json:\"archived\"`\n        Id               int         `json:\"id\"`\n        PullsURL         string      `json:\"pulls_url\"`\n        NotificationsURL string      `json:\"notifications_url\"`\n        SvnURL           string      `json:\"svn_url\"`\n        NetworkCount     int         `json:\"network_count\"`\n        IssuesURL        string      `json:\"issues_url\"`\n        TreesURL         string      `json:\"trees_url\"`\n        IssueCommentURL  string      `json:\"issue_comment_url\"`\n        SshURL           string      `json:\"ssh_url\"`\n        GitCommitsURL    string      `json:\"git_commits_url\"`\n        CommentsURL      string      `json:\"comments_url\"`\n        Size             int         `json:\"size\"`\n        WatchersCount    int         `json:\"watchers_count\"`\n        Url              string      `json:\"url\"`\n        KeysURL          string      `json:\"keys_url\"`\n        EventsURL        string      `json:\"events_url\"`\n        TagsURL          string      `json:\"tags_url\"`\n        Language         string      `json:\"language\"`\n        Owner            struct {\n                AvatarURL         string `json:\"avatar_url\"`\n                GravatarID        string `json:\"gravatar_id\"`\n                StarredURL        string `json:\"starred_url\"`\n                ReposURL          string `json:\"repos_url\"`\n                FollowersURL      string `json:\"followers_url\"`\n                SubscriptionsURL  string `json:\"subscriptions_url\"`\n                Type              string `json:\"type\"`\n                SiteAdmin         bool   `json:\"site_admin\"`\n                Id                int    `json:\"id\"`\n                GistsURL          string `json:\"gists_url\"`\n                EventsURL         string `json:\"events_url\"`\n                Login             string `json:\"login\"`\n                Url               string `json:\"url\"`\n                HtmlURL           string `json:\"html_url\"`\n                FollowingURL      string `json:\"following_url\"`\n                OrganizationsURL  string `json:\"organizations_url\"`\n                ReceivedEventsURL string `json:\"received_events_url\"`\n        } `json:\"owner\"`\n        GitTagsURL      string `json:\"git_tags_url\"`\n        StargazersURL   string `json:\"stargazers_url\"`\n        ForksCount      int    `json:\"forks_count\"`\n        GitRefsURL      string `json:\"git_refs_url\"`\n        CommitsURL      string `json:\"commits_url\"`\n        ContentsURL     string `json:\"contents_url\"`\n        CompareURL      string `json:\"compare_url\"`\n        DownloadsURL    string `json:\"downloads_url\"`\n        DeploymentsURL  string `json:\"deployments_url\"`\n        HasIssues       bool   `json:\"has_issues\"`\n        FullName        string `json:\"full_name\"`\n        UpdatedAt       string `json:\"updated_at\"`\n        HasProjects     bool   `json:\"has_projects\"`\n        SubscriptionURL string `json:\"subscription_url\"`\n        ReleasesURL     string `json:\"releases_url\"`\n        HasDownloads    bool   `json:\"has_downloads\"`\n        HtmlURL         string `json:\"html_url\"`\n        Fork            bool   `json:\"fork\"`\n        CreatedAt       string `json:\"created_at\"`\n        HasWiki         bool   `json:\"has_wiki\"`\n        License         struct {\n                Key    string `json:\"key\"`\n                Name   string `json:\"name\"`\n                SpdxID string `json:\"spdx_id\"`\n                Url    string `json:\"url\"`\n        } `json:\"license\"`\n        Name            string      `json:\"name\"`\n        ForksURL        string      `json:\"forks_url\"`\n        AssigneesURL    string      `json:\"assignees_url\"`\n        BranchesURL     string      `json:\"branches_url\"`\n        GitURL          string      `json:\"git_url\"`\n        StatusesURL     string      `json:\"statuses_url\"`\n        ContributorsURL string      `json:\"contributors_url\"`\n        LabelsURL       string      `json:\"labels_url\"`\n        Homepage        interface{} `json:\"homepage\"`\n        OpenIssuesCount int         `json:\"open_issues_count\"`\n        Forks           int         `json:\"forks\"`\n        OpenIssues      int         `json:\"open_issues\"`\n        MergesURL       string      `json:\"merges_url\"`\n        MilestonesURL   string      `json:\"milestones_url\"`\n        StargazersCount int         `json:\"stargazers_count\"`\n        DefaultBranch   string      `json:\"default_branch\"`\n}\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas%2Fsanctify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fas%2Fsanctify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas%2Fsanctify/lists"}