public static class Writers.TemporalWriter<T extends TemporalAccessor> extends Writers.PrimitiveTypeWriter
Modifier and Type | Field and Description |
---|---|
protected DateTimeFormatter |
formatter |
Constructor and Description |
---|
TemporalWriter() |
Modifier and Type | Method and Description |
---|---|
void |
setFormatter(DateTimeFormatter formatter) |
void |
writePrimitiveForm(Object obj,
Writer output)
This method will be called to write the item in primitive form (if the response to hasPrimitiveForm()
was true).
|
protected void |
writePrimitiveForm(T temporal,
Writer output) |
getKey, hasPrimitiveForm, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasPrimitiveForm, write, writePrimitiveForm
protected DateTimeFormatter formatter
public void setFormatter(DateTimeFormatter formatter)
public void writePrimitiveForm(Object obj, Writer output) throws IOException
JsonWriter.JsonClassWriter
obj
- Object to be writtenoutput
- Writer destination to where the actual JSON is written.IOException
- if thrown by the writer. Will be caught at a higher level and wrapped in JsonIoException.protected void writePrimitiveForm(T temporal, Writer output) throws IOException
IOException
Copyright © 2024. All rights reserved.