@Beta public class GenericRecordJsonWriter extends java.lang.Object implements java.io.Closeable
| Constructor and Description |
|---|
GenericRecordJsonWriter(java.lang.Appendable buffer) |
GenericRecordJsonWriter(java.io.File fileName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static java.lang.String |
marshal(GenericRecord record) |
static java.lang.String |
marshal(GenericRecord record,
boolean withComments) |
void |
setWithComments(boolean withComments) |
void |
write(GenericRecord record) |
void |
writeError(java.lang.String errorMsg) |
public GenericRecordJsonWriter(java.io.File fileName)
throws java.io.IOException
java.io.IOExceptionpublic GenericRecordJsonWriter(java.lang.Appendable buffer)
public static java.lang.String marshal(GenericRecord record)
public static java.lang.String marshal(GenericRecord record, boolean withComments)
public void setWithComments(boolean withComments)
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic void write(GenericRecord record)
public void writeError(java.lang.String errorMsg)