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:

  • number defaults to 0
  • size defaults to the content size (minimum 1)
  • totalElements defaults 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      deserialize in class tools.jackson.databind.ValueDeserializer<org.springframework.data.domain.Page<?>>