Class DoclingServeJackson3Client

java.lang.Object
ai.docling.serve.client.DoclingServeClient
ai.docling.serve.client.DoclingServeJackson3Client
All Implemented Interfaces:
ai.docling.serve.api.DoclingServeApi

public class DoclingServeJackson3Client extends DoclingServeClient
A client implementation that leverages Jackson 3 for JSON serialization and deserialization.

This class extends DoclingServeClient and provides a concrete implementation for reading and writing JSON data using a JsonMapper instance.

  • Method Details

    • toBuilder

    • readValue

      protected <T> T readValue(String json, Class<T> valueType)
      Description copied from class: DoclingServeClient
      Reads and deserializes the given JSON string into an instance of the specified type.
      Specified by:
      readValue in class DoclingServeClient
      Type Parameters:
      T - the type of the object to be deserialized
      Parameters:
      json - the JSON string to deserialize; must not be null
      valueType - the Class of the target type; must not be null
      Returns:
      an instance of T deserialized from the provided JSON
    • writeValueAsString

      protected <T> String writeValueAsString(T value)
      Description copied from class: DoclingServeClient
      Serializes the given object into its JSON string representation.
      Specified by:
      writeValueAsString in class DoclingServeClient
      Type Parameters:
      T - the type of the object to serialize
      Parameters:
      value - the object to serialize; must not be null
      Returns:
      the JSON string representation of the given object