RuntimeTypeInfo
, CurrentItem<T>
public class ObjectSerializer<T> extends AbstractContainerSerializer<T>
Constructor | Description |
---|---|
ObjectSerializer(CurrentItem<?> wrapper,
Type runtimeType,
ClassModel classModel,
JsonBindingModel wrapperModel) |
Creates a new instance.
|
ObjectSerializer(SerializerBuilder builder) |
Creates a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
serializeInternal(T object,
javax.json.stream.JsonGenerator generator,
javax.json.bind.serializer.SerializationContext ctx) |
|
protected void |
writeStart(String key,
javax.json.stream.JsonGenerator generator) |
Write start object or start array with key.
|
protected void |
writeStart(javax.json.stream.JsonGenerator generator) |
Write start object or start array without a key.
|
serialize, serializerCaptor, writeEnd
getClassModel, getRuntimeType, getWrapper, getWrapperModel, resolveContainerModelCustomization
public ObjectSerializer(SerializerBuilder builder)
builder
- Builder to initialize the instance.public ObjectSerializer(CurrentItem<?> wrapper, Type runtimeType, ClassModel classModel, JsonBindingModel wrapperModel)
wrapper
- wrapped itemruntimeType
- class typeclassModel
- model of the classwrapperModel
- data binding modelprotected void serializeInternal(T object, javax.json.stream.JsonGenerator generator, javax.json.bind.serializer.SerializationContext ctx)
serializeInternal
in class AbstractContainerSerializer<T>
protected void writeStart(javax.json.stream.JsonGenerator generator)
AbstractContainerSerializer
writeStart
in class AbstractContainerSerializer<T>
generator
- JSON generator.protected void writeStart(String key, javax.json.stream.JsonGenerator generator)
AbstractContainerSerializer
writeStart
in class AbstractContainerSerializer<T>
key
- JSON key name.generator
- JSON generator.Copyright © 2017 Oracle Corporation. All rights reserved.