com.javanut.pronghorn.util.parse.JSONVisitorNull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pronghorn-pipes Show documentation
Show all versions of pronghorn-pipes Show documentation
Ring buffer based queuing utility for applications that require high performance and/or a small
footprint. Well suited for embedded and stream based processing.
package com.javanut.pronghorn.util.parse;
import com.javanut.pronghorn.util.Appendables;
import com.javanut.pronghorn.util.ByteConsumer;
public class JSONVisitorNull implements JSONVisitor {
final StringBuilder builder = new StringBuilder();
final ByteConsumer con = new ByteConsumer() {
@Override
public void consume(byte[] backing, int pos, int len, int mask) {
Appendables.appendUTF8(builder, backing, pos, len, mask);
}
@Override
public void consume(byte value) {
builder.append((char)value);
}
};
@Override
public ByteConsumer stringValue() {
builder.setLength(0);
return con;
}
@Override
public void stringValueComplete() {
}
@Override
public ByteConsumer stringName(int fieldIndex) {
builder.setLength(0);
return con;
}
@Override
public void stringNameComplete() {
}
@Override
public void arrayBegin() {
}
@Override
public void arrayEnd() {
}
@Override
public void arrayIndexBegin(int instance) {
}
@Override
public void numberValue(long m, byte e) {
}
@Override
public void nullValue() {
}
@Override
public void booleanValue(boolean b) {
}
@Override
public void objectEnd() {
}
@Override
public void objectBegin() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy