io.avaje.jsonb.jackson.JacksonWriteBuffer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avaje-jsonb-jackson Show documentation
Show all versions of avaje-jsonb-jackson Show documentation
jackson adapter for avaje-jsonb
package io.avaje.jsonb.jackson;
import com.fasterxml.jackson.core.io.SegmentedStringWriter;
import io.avaje.jsonb.JsonWriter;
import io.avaje.jsonb.spi.BufferedJsonWriter;
import io.avaje.jsonb.spi.DelegateJsonWriter;
final class JacksonWriteBuffer extends DelegateJsonWriter implements BufferedJsonWriter {
private final SegmentedStringWriter buffer;
JacksonWriteBuffer(JsonWriter delegate, SegmentedStringWriter buffer) {
super(delegate);
this.buffer = buffer;
}
@Override
public String result() {
delegate.close();
return buffer.getAndClear();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy