com.nutanix.dp1.sec.serializers.SecComplexListSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of security-java-client Show documentation
Show all versions of security-java-client Show documentation
Manage security features, such as encryption, certificates, or platform hardening.
The newest version!
package com.nutanix.dp1.sec.serializers;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import com.nutanix.dp1.sec.deserializers.SecObjectTypeTypedObject;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
import static com.nutanix.dp1.sec.serializers.SecSerializerUtils.*;
@Slf4j
public class SecComplexListSerializer extends StdSerializer> {
protected SecComplexListSerializer() {
super(TYPE_FACTORY.constructCollectionType(java.util.List.class, SecObjectTypeTypedObject.class));
}
@SneakyThrows
@Override
public void serialize(List objectTypeTypedObjectList, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) {
log.debug("Serializing via SecComplexListSerializer");
serializeListWithoutHiddenFields(objectTypeTypedObjectList, jsonGenerator, serializerProvider);
}
@Override
public boolean isEmpty(SerializerProvider provider, List value) {
return super.isEmpty(provider, value) || value.isEmpty();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy