All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bitpay.sdk.util.JsonMapperFactory Maven / Gradle / Ivy

Go to download

Full implementation of the BitPay Payment Gateway. This library implements BitPay's Cryptographically Secure RESTful API.

There is a newer version: 10.1.1
Show newest version
/*
 * Copyright (c) 2019 BitPay.
 * All rights reserved.
 */

package com.bitpay.sdk.util;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

/**
 * The type Json mapper factory.
 */
public class JsonMapperFactory {

    /**
     * Create json mapper.
     *
     * @return the json mapper
     */
    public static JsonMapper create() {
        return JsonMapper
            .builder()
            .addModule(new JavaTimeModule())
            .configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true)
            .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
            .build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy