public interface SerializationContext
JsonbSerializer
Modifier and Type | Method and Description |
---|---|
<T> void |
serialize(java.lang.String key,
T object,
JsonGenerator generator)
Serializes arbitrary object to JSON, using current
javax.json.stream.JsonGenerator instance. |
<T> void |
serialize(T object,
JsonGenerator generator)
Serializes arbitrary object to JSON, using current
javax.json.stream.JsonGenerator instance. |
<T> void serialize(java.lang.String key, T object, JsonGenerator generator)
javax.json.stream.JsonGenerator
instance.
Serialization is ran as serialization of a root type from user JsonbSerializer
. JsonGenerator
instance is shared with JSONB and user serializer.T
- Type of serialized object.key
- JSON key name.object
- Object to serialize.generator
- JSONP generator to serialize with.<T> void serialize(T object, JsonGenerator generator)
javax.json.stream.JsonGenerator
instance.
Serialization is ran as serialization of a root type from user JsonbSerializer
. JsonGenerator
instance is shared with JSONB and user serializer.
Method without key parameter is intended to serialize inside JSON_ARRAYs.T
- Type of serialized object.object
- Object to serialize.generator
- JSONP generator to serialize with.