io.robe.convert.json.JSONExporter Maven / Gradle / Ivy
package io.robe.convert.json;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.robe.convert.common.Exporter;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Iterator;
public class JSONExporter extends Exporter {
public JSONExporter(Class dataClass) {
super(dataClass);
}
@Override
public void exportStream(OutputStream outputStream, Iterator iterator) throws IOException, ClassNotFoundException, IllegalAccessException {
ObjectMapper mapper = new ObjectMapper();
mapper.writeValue(outputStream, iterator);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy