-
public interface SerializationContext
Provides JSONB internals for custom serializers.- Since:
- JSON Binding 1.0
- See Also:
JsonbSerializer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> void
serialize(String key, T object, jakarta.json.stream.JsonGenerator generator)
Serializes arbitrary object to JSON, using currentJsonGenerator
instance.<T> void
serialize(T object, jakarta.json.stream.JsonGenerator generator)
Serializes arbitrary object to JSON, using currentJsonGenerator
instance.
-
-
-
Method Detail
-
serialize
<T> void serialize(String key, T object, jakarta.json.stream.JsonGenerator generator)
Serializes arbitrary object to JSON, using currentJsonGenerator
instance. Serialization is ran as serialization of a root type from userJsonbSerializer
.JsonGenerator
instance is shared with JSONB and user serializer.- Type Parameters:
T
- Type of serialized object.- Parameters:
key
- JSON key name.object
- Object to serialize.generator
- JSONP generator to serialize with.
-
serialize
<T> void serialize(T object, jakarta.json.stream.JsonGenerator generator)
Serializes arbitrary object to JSON, using currentJsonGenerator
instance. Serialization is ran as serialization of a root type from userJsonbSerializer
.JsonGenerator
instance is shared with JSONB and user serializer. Method without key parameter is intended to serialize inside JSON_ARRAYs.- Type Parameters:
T
- Type of serialized object.- Parameters:
object
- Object to serialize.generator
- JSONP generator to serialize with.
-
-