{"id":31970506,"url":"https://github.com/hubspot/rosetta","last_synced_at":"2025-10-14T19:15:56.068Z","repository":{"id":19373644,"uuid":"22614011","full_name":"HubSpot/Rosetta","owner":"HubSpot","description":"Java library that leverages Jackson to take the pain out of mapping objects to/from the DB, designed to integrate seamlessly with jDBI","archived":false,"fork":false,"pushed_at":"2025-09-29T20:24:30.000Z","size":531,"stargazers_count":125,"open_issues_count":8,"forks_count":33,"subscribers_count":150,"default_branch":"master","last_synced_at":"2025-09-29T22:27:09.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HubSpot.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-08-04T17:52:24.000Z","updated_at":"2025-09-29T20:24:32.000Z","dependencies_parsed_at":"2024-06-09T02:26:54.680Z","dependency_job_id":"4a902841-55f7-43b8-b3dd-b872b90188b8","html_url":"https://github.com/HubSpot/Rosetta","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/HubSpot/Rosetta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FRosetta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FRosetta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FRosetta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FRosetta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HubSpot","download_url":"https://codeload.github.com/HubSpot/Rosetta/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FRosetta/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020649,"owners_count":26086895,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-10-14T19:15:52.112Z","updated_at":"2025-10-14T19:15:56.060Z","avatar_url":"https://github.com/HubSpot.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rosetta [![Build Status](https://travis-ci.org/HubSpot/Rosetta.svg?branch=master)](https://travis-ci.org/HubSpot/Rosetta)\n\n## Overview\n\nRosetta is a Java library that leverages [Jackson](https://github.com/FasterXML/jackson) to take the pain out of mapping objects to/from the DB, designed to integrate seamlessly with [Jdbi](https://github.com/jdbi/jdbi). Jackson is extremely fast, endlessly configurable, and already used by many Java webapps.\n\n## Usage\n\nIf you are on Jdbi 2, add the following dependency:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.hubspot.rosetta\u003c/groupId\u003e\n  \u003cartifactId\u003eRosettaJdbi\u003c/artifactId\u003e\n  \u003cversion\u003e{latest version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nLatest versions can be seen [here](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.rosetta%22)\n\nOr if you are on Jdbi 3, add the following dependency:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.hubspot.rosetta\u003c/groupId\u003e\n  \u003cartifactId\u003eRosettaJdbi3\u003c/artifactId\u003e\n  \u003cversion\u003e{latest version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nLatest versions can be seen [here](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.rosetta%22)\n\n## Binding\n\nYou can [bind JDBI arguments](http://jdbi.org/#_binding_arguments) in your DAO using `@BindWithRosetta`.\n\n```java\npublic interface MyDAO {\n  @SqlUpdate(\"UPDATE my_table SET name = :name, type = :type WHERE id = :id\")\n  void update(@BindWithRosetta MyRow obj);\n}\n```\n\n`@BindWithRosetta` converts the object to a tree using Jackson, and then binds every property in the JSON tree on the Jdbi statement (using dot notation for nested object fields). This lets you use all the Jackson annotations you know and love to customize the representation.\n\n## Mapping\n\n### Jdbi 2\n\nWith Jdbi 2, you can register the Rosetta mapper globally by adding it your `DBI` like so:\n```java\ndbi.registerMapper(new RosettaMapperFactory());\n```\n\nOr to test it out on a single DAO you would do:\n```java\n@RegisterMapperFactory(RosettaMapperFactory.class)\npublic interface MyDAO { /* ... */ }\n```\n\nOr to use in combination with a `Handle`: (same idea to register on a `Query`)\n```java\nhandle.registerMapper(new RosettaMapperFactory());\n```\n\n### Jdbi 3\n\nWith Jdbi 3, you can register the Rosetta mapper globally by adding it your `Jdbi` like so:\n```java\njdbi.registerRowMapper(new RosettaRowMapperFactory());\n```\n\nOr to test it out on a single DAO you would do:\n```java\n@RegisterRowMapperFactory(RosettaRowMapperFactory.class)\npublic interface MyDAO { /* ... */ }\n```\n\nOr to use in combination with a `Handle`: (same idea to register on a `Query`)\n```java\nhandle.registerRowMapper(new RosettaRowMapperFactory());\n```\n\n## Advanced Features\n\nFor a list of advanced features, see [here](FEATURES.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspot%2Frosetta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubspot%2Frosetta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspot%2Frosetta/lists"}