JacksonBlackboardEntrySerializer

class JacksonBlackboardEntrySerializer(objectMapper: <Error class: unknown class>) : BlackboardEntrySerializer

Default JSON serializer for blackboard entries.

Uses the caller-provided Embabel ObjectMapper. The serializer is stateless and suitable for shared use. It records the runtime JVM class name as the value type and restores through that class, which is appropriate for simple DTOs, Kotlin data classes, records, primitives, and collections that Jackson can handle.

Generic type erasure: parameterised collections such as List<MyDto> are stored and restored as their raw type. Jackson deserializes elements as LinkedHashMap rather than MyDto. Use a custom BlackboardEntrySerializer for any blackboard value that requires type parameters at restore time.

Applications needing different semantics, such as storing JPA entities as references instead of materialized object graphs, should provide a more specific BlackboardEntrySerializer ahead of this fallback.

Constructors

Link copied to clipboard
constructor(objectMapper: <Error class: unknown class>)

Functions

Link copied to clipboard

Convert a durable payload back into a blackboard value.

Link copied to clipboard

Convert a live blackboard value into a durable payload.

Link copied to clipboard

Return true when this serializer should restore the serialized blackboard value.

Link copied to clipboard
open override fun supportsSerialization(value: Any): Boolean

Return true when this serializer should handle the given live blackboard value.