{"id":20872412,"url":"https://github.com/romnn/flatbson","last_synced_at":"2026-04-29T05:36:31.387Z","repository":{"id":57570323,"uuid":"257229068","full_name":"romnn/flatbson","owner":"romnn","description":"flattens bson documents.","archived":false,"fork":false,"pushed_at":"2021-02-03T22:23:32.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T08:43:40.039Z","etag":null,"topics":["bson","flatten","golang","helper","mongo-driver","mongodb","utility"],"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/romnn.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":"2020-04-20T09:14:31.000Z","updated_at":"2021-02-03T22:23:35.000Z","dependencies_parsed_at":"2022-09-10T17:41:25.169Z","dependency_job_id":null,"html_url":"https://github.com/romnn/flatbson","commit_stats":null,"previous_names":["romnnn/flatbson"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fflatbson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fflatbson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fflatbson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fflatbson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romnn","download_url":"https://codeload.github.com/romnn/flatbson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243247806,"owners_count":20260747,"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":["bson","flatten","golang","helper","mongo-driver","mongodb","utility"],"created_at":"2024-11-18T06:19:03.577Z","updated_at":"2025-12-26T06:01:17.445Z","avatar_url":"https://github.com/romnn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## flatbson\n\n[![Build Status](https://github.com/romnn/flatbson/workflows/test/badge.svg)](https://github.com/romnn/flatbson/actions)\n[![GitHub](https://img.shields.io/github/license/romnn/flatbson)](https://github.com/romnn/flatbson)\n[![GoDoc](https://godoc.org/github.com/romnn/flatbson?status.svg)](https://godoc.org/github.com/romnn/flatbson)\n[![Test Coverage](https://codecov.io/gh/romnn/flatbson/branch/master/graph/badge.svg)](https://codecov.io/gh/romnn/flatbson)\n[![Release](https://img.shields.io/github/release/romnn/flatbson)](https://github.com/romnn/flatbson/releases/latest)\n\nGo package for flattening bson documents.\n\n\n\n#### Usage as a library\n\n```golang\nimport \"github.com/romnn/flatbson\"\n```\n\nExample:\n```golang\nimport (\n\t\"fmt\"\n\t\"github.com/romnn/flatbson\"\n\t\"go.mongodb.org/mongo-driver/bson\"\n)\n\nfunc main() {\n    input := bson.D{\n\t\t{\"user\", bson.D{{\"email\", \"test\"}}},\n\t\t{\"metadata\", bson.D{{\"city\", bson.D{{\"name\", \"Berlin\"}}}}},\n\t}\n\t// Flatten the document\n\tflattened, err := flatbson.Flattened(input, \".\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n    fmt.Println(flattened)\n}\n```\n\nFor more examples, see `examples/`.\n\n\n#### Development\n\n######  Prerequisites\n\nBefore you get started, make sure you have installed the following tools::\n\n    $ python3 -m pip install -U cookiecutter\u003e=1.4.0\n    $ python3 -m pip install pre-commit bump2version invoke ruamel.yaml halo\n    $ go get -u golang.org/x/tools/cmd/goimports\n    $ go get -u golang.org/x/lint/golint\n    $ go get -u github.com/fzipp/gocyclo\n    $ go get -u github.com/mitchellh/gox  # if you want to test building on different architectures\n\n**Remember**: To be able to excecute the tools downloaded with `go get`, \nmake sure to include `$GOPATH/bin` in your `$PATH`.\nIf `echo $GOPATH` does not give you a path make sure to run\n(`export GOPATH=\"$HOME/go\"` to set it). In order for your changes to persist, \ndo not forget to add these to your shells `.bashrc`.\n\nWith the tools in place, it is strongly advised to install the git commit hooks to make sure checks are passing in CI:\n```bash\ninvoke install-hooks\n```\n\nYou can check if all checks pass at any time:\n```bash\ninvoke pre-commit\n```\n\nNote for Maintainers: After merging changes, tag your commits with a new version and push to GitHub to create a release:\n```bash\nbump2version (major | minor | patch)\ngit push --follow-tags\n```\n\n#### Note\n\nThis project is still in the alpha stage and should not be considered production ready.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromnn%2Fflatbson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromnn%2Fflatbson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromnn%2Fflatbson/lists"}