Package ru.tinkoff.kora.json.common
Interface JsonWriter<T>
- All Known Implementing Classes:
EnumJsonWriter,JsonField.DefaultWriter,ListJsonWriter,MapJsonWriter,RawJsonWriter,SetJsonWriter,UuidJsonCodec
public interface JsonWriter<T>
Русский: Контракт писателя JSON со всеми методами записи
English: JSON writer contract with all write methods
English: JSON writer contract with all write methods
-
Method Summary
Modifier and TypeMethodDescriptiondefault byte[]toByteArray(T value) default byte[]toByteArrayUnchecked(T value) default Stringdefault StringtoStringUnchecked(T value) void
-
Method Details
-
write
void write(com.fasterxml.jackson.core.JsonGenerator generator, @Nullable T object) throws IOException - Parameters:
generator- jackson generator that will be used for writing object to JSONobject- to serialize into JSON- Throws:
IOException- in case of serialization errors
-
toByteArray
- Throws:
IOException
-
toByteArrayUnchecked
- Throws:
UncheckedIOException
-
toString
- Throws:
IOException
-
toStringUnchecked
- Throws:
UncheckedIOException
-