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

com.adgear.anoa.read.JacksonStreamsBase Maven / Gradle / Ivy

Go to download

Additional functionality complementing the anoa-core module, requiring additional upstream dependencies such as jackson-databind and various jackson dataformats.

There is a newer version: 3.1.2
Show newest version
package com.adgear.anoa.read;

import com.fasterxml.jackson.core.FormatSchema;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;

import java.util.Optional;

class JacksonStreamsBase<
    M extends ObjectMapper,
    F extends JsonFactory,
    S extends FormatSchema,
    P extends JsonParser>
    extends JacksonStreams {

  JacksonStreamsBase(/*@NonNull*/ M objectMapper) {
    this(objectMapper, Optional.empty());
  }

  JacksonStreamsBase(/*@NonNull*/ M objectMapper, /*@NonNull*/ Optional schema) {
    super(objectMapper, schema);
    objectMapper.findAndRegisterModules();
  }
}