| Constructor and Description |
|---|
JsonEncoder() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
contentType()
Content type of converter.
|
byte[] |
encode(T object)
Encode a message object of type T into given bytes.
|
public byte[] encode(T object) throws EncodeException
EncoderEncode a message object of type T into given bytes.
encode in interface Encoder<T>EncodeException - If the conversion failspublic java.lang.String contentType()
EncoderContent type of converter.
<h4>Example:</h4>
application/json
contentType in interface Encoder<T>null