Giter VIP home page Giter VIP logo

vavr-jackson's Introduction

Maven Central Build Status Coverage Status Gitter Chat

vavr-jackson

Jackson datatype module for Vavr library

Usage

Maven

<dependency>
  <groupId>io.vavr</groupId>
  <artifactId>vavr-jackson</artifactId>
  <version>0.10.3</version>
</dependency>

Gradle

compile("io.vavr:vavr-jackson:0.10.3")

Registering module

Just register a new instance of VavrModule

ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new VavrModule());

Serialization/deserialization

String json = mapper.writeValueAsString(List.of(1));
// = [1]
List<Integer> restored = mapper.readValue(json, new TypeReference<List<Integer>>() {});
// = List(1)

Using Developer Versions

Developer versions can be found here.

Maven

<dependency>
  <groupId>io.vavr</groupId>
  <artifactId>vavr-jackson</artifactId>
  <version>1.0.0-SNAPSHOT</version>
</dependency>

Ensure that your ~/.m2/settings.xml contains the following:

<profiles>
    <profile>
        <id>allow-snapshots</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <repositories>
            <repository>
                <id>snapshots-repo</id>
                <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                <releases>
                    <enabled>false</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
    </profile>
</profiles>

Gradle

compile("io.vavr:vavr-jackson:1.0.0-SNAPSHOT")

Ensure that your build.gradle contains the following:

repositories {
    mavenCentral()
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
}

vavr-jackson's People

Contributors

ruslansennov avatar mincong-h avatar danieldietrich avatar sullis avatar emmanueltouzery avatar diagoras avatar kennymacleod avatar bmscomp avatar tahlers avatar zsolt-donca avatar atrianac avatar chb0github avatar nstdio avatar nrktkt avatar rnowak4 avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.