Class JacksonPageDeserializer
java.lang.Object
tools.jackson.databind.ValueDeserializer<org.springframework.data.domain.Page<?>>
org.axonframework.extension.spring.data.JacksonPageDeserializer
- All Implemented Interfaces:
tools.jackson.databind.deser.NullValueProvider
public class JacksonPageDeserializer
extends tools.jackson.databind.ValueDeserializer<org.springframework.data.domain.Page<?>>
Custom Jackson deserializer for the Spring Data
Page interface.
This deserializer converts JSON representations of paginated data into PageImpl instances. It extracts the
content array, number (page number), size (page size), and totalElements from the
JSON structure.
The deserializer handles missing fields gracefully by applying sensible defaults:
numberdefaults to 0sizedefaults to the content size (minimum 1)totalElementsdefaults to the content size
- Since:
- 5.1.0
- Author:
- Theo Emanuelsson
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.ValueDeserializer
tools.jackson.databind.ValueDeserializer.None -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<?> deserialize(tools.jackson.core.JsonParser p, tools.jackson.databind.DeserializationContext ctxt) Methods inherited from class tools.jackson.databind.ValueDeserializer
createContextual, deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, resolve, supportsUpdate, unwrappingDeserializer
-
Constructor Details
-
JacksonPageDeserializer
public JacksonPageDeserializer()
-
-
Method Details
-
deserialize
public org.springframework.data.domain.Page<?> deserialize(tools.jackson.core.JsonParser p, tools.jackson.databind.DeserializationContext ctxt) - Specified by:
deserializein classtools.jackson.databind.ValueDeserializer<org.springframework.data.domain.Page<?>>
-