Class BendableScoreJacksonSerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<Score_>
org.optaplanner.persistence.jackson.api.score.AbstractScoreJacksonSerializer<org.optaplanner.core.api.score.buildin.bendable.BendableScore>
org.optaplanner.persistence.jackson.api.score.buildin.bendable.BendableScoreJacksonSerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable,com.fasterxml.jackson.databind.ser.ContextualSerializer
public class BendableScoreJacksonSerializer
extends AbstractScoreJacksonSerializer<org.optaplanner.core.api.score.buildin.bendable.BendableScore>
Jackson binding support for a
Score subtype.
For a Score field, use PolymorphicScoreJacksonSerializer instead,
so the score type is recorded too and it can be deserialized.
For example: use
@JsonSerialize(using = HardSoftScoreJacksonSerializer.class) @JsonDeserialize(using = HardSoftScoreJacksonDeserializer.class)
on a HardSoftScore score field and it will marshalled to JSON as "score":"-999hard/-999soft".
Or better yet, use OptaPlannerJacksonModule instead.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.optaplanner.persistence.jackson.api.score.AbstractScoreJacksonSerializer
createContextual, serializeMethods inherited from class com.fasterxml.jackson.databind.JsonSerializer
acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId
-
Constructor Details
-
BendableScoreJacksonSerializer
public BendableScoreJacksonSerializer()
-