{"id":13343012,"url":"https://github.com/rvflash/flat","last_synced_at":"2026-05-05T17:31:50.320Z","repository":{"id":144269950,"uuid":"368993590","full_name":"rvflash/flat","owner":"rvflash","description":"Flat provides methods to handle JSON, XML or YAML data as a map[string]interface","archived":false,"fork":false,"pushed_at":"2023-03-17T22:43:48.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T16:04:10.590Z","etag":null,"topics":["golang","json","marshalling","xml","yaml"],"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/rvflash.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":"2021-05-19T20:28:50.000Z","updated_at":"2023-03-17T22:39:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"552e40e1-4c44-4b43-afa7-c9518788f34d","html_url":"https://github.com/rvflash/flat","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/rvflash/flat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fflat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fflat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fflat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fflat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvflash","download_url":"https://codeload.github.com/rvflash/flat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fflat/sbom","scorecard":{"id":791115,"data":{"date":"2025-08-11","repo":{"name":"github.com/rvflash/flat","commit":"394f5c51705685d6dde1d79e3f6ca65cbd49b3b2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":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":"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":"Code-Review","score":0,"reason":"Found 0/11 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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go-build.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/rvflash/flat/go-build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go-build.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/rvflash/flat/go-build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go-build.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/rvflash/flat/go-build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go-build.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/rvflash/flat/go-build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/rvflash/flat/golangci-lint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/rvflash/flat/golangci-lint.yml/main?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/go-build.yml:26","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go-build.yml:1","Warn: no topLevel permission defined: .github/workflows/golangci-lint.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":"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: LICENCE:0","Info: FSF or OSI recognized license: MIT License: LICENCE: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 'main'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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-23T07:35:12.069Z","repository_id":144269950,"created_at":"2025-08-23T07:35:12.069Z","updated_at":"2025-08-23T07:35:12.069Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32660196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":["golang","json","marshalling","xml","yaml"],"created_at":"2024-07-29T19:30:36.482Z","updated_at":"2026-05-05T17:31:50.304Z","avatar_url":"https://github.com/rvflash.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flat\n\n[![GoDoc](https://godoc.org/github.com/rvflash/flat?status.svg)](https://godoc.org/github.com/rvflash/flat)\n[![Build Status](https://github.com/rvflash/flat/workflows/build/badge.svg)](https://github.com/rvflash/flat/actions?workflow=build)\n[![Code Coverage](https://codecov.io/gh/rvflash/flat/branch/main/graph/badge.svg)](https://codecov.io/gh/rvflash/flat)\n[![Go Report Card](https://goreportcard.com/badge/github.com/rvflash/flat?)](https://goreportcard.com/report/github.com/rvflash/flat)\n\nThe package `flat` provides methods to handle JSON, XML or YAML data as a `map[string]interface{}`, \nuseful to manipulate unknown structures or to flatten them into a single dimension.\n\n\n### Installation\n\nTo install it, you need to install Go and set your Go workspace first.\nThen, download and install it:\n\n```bash\n$ go get -u github.com/rvflash/flat\n```    \nImport it in your code:\n\n```go\nimport \"github.com/rvflash/flat\"\n```\n\n\n### Prerequisite\n\n`flat` uses the Go modules that required Go 1.11 or later.\n\n\n### XML Samples (see the example tests)\n\n\u003e Errors are ignored just for the demo.\n\n#### Marshal\n\n```go\nvar (\n    d = map[string]interface{}{\n        \"languages\": map[string]interface{}{\n            \"en\": \"English\",\n            \"fr\": \"French\",\n        },\n    }\n    res   = bytes.Buffer{}\n    attrs = []xml.Attr{\n        {Name: xml.Name{Local: \"xmlns:xsi\"}, Value: \"http://www.w3.org/2001/XMLSchema-instance\"},\n    }\n    _ = flat.New(\n        d,\n        flat.XMLName(\"custom\"),\n        flat.XMLNS(\"http://schemas.xmlsoap.org/soap/envelope/\"),\n        flat.XMLAttributes(attrs),\n    ).XMLEncode(\u0026res)\n)\nfmt.Println(res.String())\n// Output:\n// \u003ccustom xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\u003e\u003clanguages\u003e\u003cen\u003eEnglish\u003c/en\u003e\u003cfr\u003eFrench\u003c/fr\u003e\u003c/languages\u003e\u003c/custom\u003e\n```\n\n#### Unmarshal\n\n```go\nvar (\n    d   = flat.D{}\n    _ = xml.Unmarshal([]byte(`\u003ccustom\u003e\u003clanguages\u003e\u003cen\u003eEnglish\u003c/en\u003e\u003cfr\u003eFrench\u003c/fr\u003e\u003c/languages\u003e\u003c/custom\u003e`), \u0026d)\n)\nfmt.Printf(\"%#v\", d.Flatten())\n// Output:\n// map[string]interface {}{\"languages_en\":\"English\", \"languages_fr\":\"French\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Fflat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvflash%2Fflat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Fflat/lists"}