{"id":19468810,"url":"https://github.com/imrafaelmerino/mongo-values","last_synced_at":"2026-02-07T17:31:02.159Z","repository":{"id":263570041,"uuid":"848706914","full_name":"imrafaelmerino/mongo-values","owner":"imrafaelmerino","description":"This library provides codecs for seamless integration between json-values and BSON, abstracting conversions between BSON types and their `JsValue` equivalents (e.g., `BsonType.STRING` → `JsStr`). It includes a `BsonReader` and `BsonWriter` to handle encoding/decoding effortlessly.   ","archived":false,"fork":false,"pushed_at":"2024-11-23T21:52:35.000Z","size":14165,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T05:30:41.932Z","etag":null,"topics":["bson","immutability","java","json","json-values","mongodb","persistent-data-structure"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imrafaelmerino.png","metadata":{"files":{"readme":"docs/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,"zenodo":null}},"created_at":"2024-08-28T08:58:09.000Z","updated_at":"2024-11-23T21:52:38.000Z","dependencies_parsed_at":"2025-04-15T05:38:22.860Z","dependency_job_id":"0b22c799-fad2-48e7-bd8a-ebe09c723551","html_url":"https://github.com/imrafaelmerino/mongo-values","commit_stats":null,"previous_names":["imrafaelmerino/mongo-values"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/imrafaelmerino/mongo-values","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrafaelmerino%2Fmongo-values","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrafaelmerino%2Fmongo-values/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrafaelmerino%2Fmongo-values/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrafaelmerino%2Fmongo-values/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imrafaelmerino","download_url":"https://codeload.github.com/imrafaelmerino/mongo-values/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrafaelmerino%2Fmongo-values/sbom","scorecard":{"id":486297,"data":{"date":"2025-08-11","repo":{"name":"github.com/imrafaelmerino/mongo-values","commit":"89d2c20ec0f5633f14f97b80f6f887390f6dd25d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/7 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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":"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":"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":"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-19T17:54:27.571Z","repository_id":263570041,"created_at":"2025-08-19T17:54:27.572Z","updated_at":"2025-08-19T17:54:27.572Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29201066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T16:28:23.579Z","status":"ssl_error","status_checked_at":"2026-02-07T16:28:22.566Z","response_time":63,"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":["bson","immutability","java","json","json-values","mongodb","persistent-data-structure"],"created_at":"2024-11-10T18:44:04.142Z","updated_at":"2026-02-07T17:31:02.140Z","avatar_url":"https://github.com/imrafaelmerino.png","language":"Java","funding_links":["https://www.buymeacoffee.com/imrafaelmerino"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./logo/package_twitter_if9bsyj4/base/full/coverphoto/base_logo_white_background.png\" alt=\"logo\"/\u003e\n\n[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-%E2%98%95%20Support-yellow)](https://www.buymeacoffee.com/imrafaelmerino)\n\n[![Maven](https://img.shields.io/maven-central/v/com.github.imrafaelmerino/mongo-values/2.0.0)](https://search.maven.org/artifact/com.github.imrafaelmerino/mongo-values/2.0.0/jar)\n\n- [Introduction](#intro)\n- [Requirements](#requirements)\n- [Installation](#inst)\n\n## \u003ca name=\"intro\"\u003e\u003ca/\u003e Introduction \n\nIt provides a set of codecs to work with [json-values](https://github.com/imrafaelmerino/json-values)\nThe codecs abstract the processes of going from BSON to JsValue and the other way around by providing \na BsonReader and a BsonWriter.\n\nPlease find below the supported BSON types and their json-value equivalents:\n\n```java    \n    \nMap\u003cBsonType, Class\u003c?\u003e\u003e map = new HashMap\u003c\u003e();\nmap.put(BsonType.NULL, JsNull.class);\nmap.put(BsonType.ARRAY, JsArray.class);\nmap.put(BsonType.BINARY, JsBinary.class);\nmap.put(BsonType.BOOLEAN, JsBool.class);\nmap.put(BsonType.DATE_TIME, JsInstant.class);\nmap.put(BsonType.DOCUMENT, JsObj.class);\nmap.put(BsonType.DOUBLE, JsDouble.class);\nmap.put(BsonType.INT32, JsInt.class);\nmap.put(BsonType.INT64, JsLong.class);\nmap.put(BsonType.DECIMAL128, JsBigDec.class);\nmap.put(BsonType.STRING, JsStr.class);\n\n``` \n\nA CodecRegistry contains a set of Codec instances that are accessed according to the Java classes\nthat they encode from and decode to\n\nJust register the registry **JsValuesRegistry**, which contains the necessary codecs, and\nwhen defining the collection, specify the generic type **JsObj**.\nYou can use the MongoDB API **without doing any kind of conversion between BSON and JsObj**:\n\n\n```   java\nimport com.mongodb.ConnectionString;\nimport com.mongodb.MongoClientSettings;\nimport mongovalues.JsValuesRegistry;\nimport com.mongodb.client.MongoClient;\nimport com.mongodb.client.MongoClients;\nimport com.mongodb.client.MongoCollection;\nimport com.mongodb.client.MongoDatabase;\nimport jsonvalues.JsObj\n\nConnectionString connString = ???;\n \nMongoClientSettings  settings =\n             MongoClientSettings.builder()\n                                .applyConnectionString(connString)\n                                .codecRegistry(JsValuesRegistry.INSTANCE)\n                                .build();\n\nMongoClient mongoClient = result = MongoClients.create(settings);\n\nMongoCollection\u003cJsObj\u003e collection = mongoClient.getCollection(\"db\",\"collection\");\n                                                                                             \n``` \n\n\n## \u003ca name=\"requirements\"\u003e\u003ca/\u003e Requirements\n\n- For versions prior to 1.0.0, json-values requires Java 8 or later. Please note that only fixes are accepted for these\n  versions.\n- For versions starting from 1.0.0 and beyond, json-values mandates Java 17 or later.\n\n## \u003ca name=\"inst\"\u003e\u003ca/\u003e Installation\n\nTo include json-values in your project, add the corresponding dependency to your build tool based on your Java version:\n\nFor Java 8 or higher:\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.imrafaelmerino\u003c/groupId\u003e\n    \u003cartifactId\u003emongo-values\u003c/artifactId\u003e\n    \u003cversion\u003e0.9.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nFor Java 17 or higher:\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.imrafaelmerino\u003c/groupId\u003e\n    \u003cartifactId\u003emongo-values\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nFor Java 21 or higher:\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.imrafaelmerino\u003c/groupId\u003e\n    \u003cartifactId\u003emongo-values\u003c/artifactId\u003e\n    \u003cversion\u003e2.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nChoose the appropriate version according to your Java runtime.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimrafaelmerino%2Fmongo-values","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimrafaelmerino%2Fmongo-values","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimrafaelmerino%2Fmongo-values/lists"}