com.enofex.naikan.model.module.ContactsDeserializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of naikan-model Show documentation
Show all versions of naikan-model Show documentation
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.Contact;
import com.enofex.naikan.model.Contacts;
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 ContactsDeserializer extends AbstractDeserializer {
@Serial
private static final long serialVersionUID = 1L;
static final ContactsDeserializer INSTANCE = new ContactsDeserializer();
ContactsDeserializer() {
super(Contacts.class, Contacts.empty());
}
@Override
public Contacts deserialize(JsonParser jsonParser, DeserializationContext ctx)
throws IOException {
Contact[] contacts = jsonParser.readValueAs(Contact[].class);
return new Contacts(List.of(contacts));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy