com.axway.apim.adapter.jackson.APIAccessSerializer Maven / Gradle / Ivy
package com.axway.apim.adapter.jackson;
import java.io.IOException;
import java.util.List;
import com.axway.apim.api.model.APIAccess;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
public class APIAccessSerializer extends StdSerializer> {
private static final long serialVersionUID = 1L;
public APIAccessSerializer() {
this(null);
}
public APIAccessSerializer(Class> apiAccess) {
super(apiAccess);
}
@Override
public void serialize(List apiAccess, JsonGenerator jgen, SerializerProvider provider) throws IOException {
//provider.getConfig().
jgen.writeStartArray();
for(APIAccess access : apiAccess) {
jgen.writeString(access.getApiId());
}
jgen.writeEndArray();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy