{"id":28601756,"url":"https://github.com/vavr-io/vavr-gson","last_synced_at":"2025-06-11T15:42:25.389Z","repository":{"id":56204334,"uuid":"86693395","full_name":"vavr-io/vavr-gson","owner":"vavr-io","description":"Gson datatype module for Vavr","archived":false,"fork":false,"pushed_at":"2020-11-20T16:12:37.000Z","size":182,"stargazers_count":17,"open_issues_count":2,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2023-08-12T16:10:41.898Z","etag":null,"topics":["gson","immutable-collections","persistent-collections","vavr"],"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/vavr-io.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-03-30T11:08:40.000Z","updated_at":"2023-07-28T03:45:04.000Z","dependencies_parsed_at":"2022-08-15T14:40:23.965Z","dependency_job_id":null,"html_url":"https://github.com/vavr-io/vavr-gson","commit_stats":null,"previous_names":[],"tags_count":6,"template":null,"template_full_name":null,"purl":"pkg:github/vavr-io/vavr-gson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vavr-io%2Fvavr-gson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vavr-io%2Fvavr-gson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vavr-io%2Fvavr-gson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vavr-io%2Fvavr-gson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vavr-io","download_url":"https://codeload.github.com/vavr-io/vavr-gson/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vavr-io%2Fvavr-gson/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259291215,"owners_count":22835301,"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":["gson","immutable-collections","persistent-collections","vavr"],"created_at":"2025-06-11T15:42:19.254Z","updated_at":"2025-06-11T15:42:25.358Z","avatar_url":"https://github.com/vavr-io.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.vavr/vavr-gson/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.vavr/vavr-gson)\n[![Build Status](https://travis-ci.org/vavr-io/vavr-gson.svg?branch=master)](https://travis-ci.org/vavr-io/vavr-gson)\n[![Coverage Status](https://codecov.io/github/vavr-io/vavr-gson/coverage.svg?branch=master)](https://codecov.io/github/vavr-io/vavr-gson?branch=master)\n[![Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vavr-io/vavr)\n\n# vavr-gson\nA set of GSON serialiser/deserialisers for [Vavr](http://vavr.io/) library\n\n## Usage\n\n### Maven\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.vavr\u003c/groupId\u003e\n  \u003cartifactId\u003evavr-gson\u003c/artifactId\u003e\n  \u003cversion\u003e0.10.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\n```groovy\ncompile(\"io.vavr:vavr-gson:0.10.2\")\n```\n\n### Registering converters\n\n```java\n  GsonBuilder builder = new GsonBuilder();\n  VavrGson.registerAll(builder);\n  gson = builder.create();\n```\n\n### Serialization/deserialization\n\n```java\n  String json = gson.toJson(List.of(List.of(1)));\n  // = [[1]]\n  Object restored1 = gson.fromJson(json, List.class);\n  // = List([1])\n  Type type = new TypeToken\u003cList\u003cList\u003cInteger\u003e\u003e\u003e(){}.getType();\n  Object restored2 = gson.fromJson(json, type);\n  // = List(List(1))\n```\n\n## Using Developer Versions\n\nDeveloper versions can be found [here](https://oss.sonatype.org/content/repositories/snapshots/io/vavr/vavr-gson).\n\n### Maven\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.vavr\u003c/groupId\u003e\n  \u003cartifactId\u003evavr-gson\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nEnsure that your `~/.m2/settings.xml` contains the following:\n\n```xml\n\u003cprofiles\u003e\n    \u003cprofile\u003e\n        \u003cid\u003eallow-snapshots\u003c/id\u003e\n        \u003cactivation\u003e\n            \u003cactiveByDefault\u003etrue\u003c/activeByDefault\u003e\n        \u003c/activation\u003e\n        \u003crepositories\u003e\n            \u003crepository\u003e\n                \u003cid\u003esnapshots-repo\u003c/id\u003e\n                \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n                \u003creleases\u003e\n                    \u003cenabled\u003efalse\u003c/enabled\u003e\n                \u003c/releases\u003e\n                \u003csnapshots\u003e\n                    \u003cenabled\u003etrue\u003c/enabled\u003e\n                \u003c/snapshots\u003e\n            \u003c/repository\u003e\n        \u003c/repositories\u003e\n    \u003c/profile\u003e\n\u003c/profiles\u003e\n```\n\n### Gradle\n\n```groovy\ncompile(\"io.vavr:vavr-gson:1.0.0-SNAPSHOT\")\n```\n\nEnsure that your `build.gradle` contains the following:\n\n```groovy\nrepositories {\n    mavenCentral()\n    maven {\n        url \"https://oss.sonatype.org/content/repositories/snapshots\"\n    }\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvavr-io%2Fvavr-gson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvavr-io%2Fvavr-gson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvavr-io%2Fvavr-gson/lists"}