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

com.enofex.naikan.model.module.LicensesDeserializer Maven / Gradle / Ivy

Go to download

The Naikan Model Module for Naikan the software inventory management tool for dev teams driven by our CI/CD pipeline.

The newest version!
package com.enofex.naikan.model.module;

import com.enofex.naikan.model.License;
import com.enofex.naikan.model.Licenses;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import java.io.IOException;
import java.io.Serial;
import java.util.List;

final class LicensesDeserializer extends AbstractDeserializer {

  @Serial
  private static final long serialVersionUID = 1L;

  static final LicensesDeserializer INSTANCE = new LicensesDeserializer();

  LicensesDeserializer() {
    super(Licenses.class, Licenses.empty());
  }

  @Override
  public Licenses deserialize(JsonParser jsonParser, DeserializationContext ctx)
      throws IOException {
    License[] licenses = jsonParser.readValueAs(License[].class);

    return new Licenses(List.of(licenses));
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy