Class DocumentResponse

java.lang.Object
ai.docling.serve.api.convert.response.DocumentResponse

public class DocumentResponse extends Object
A simple mutable POJO representing the converted document returned by the Docling Convert API. The properties map 1:1 to the JSON payload using the JsonProperty names declared on each field.

Serialization is configured with JsonInclude.Include.NON_EMPTY, meaning nulls, empty strings, and empty collections/maps are omitted from the serialized JSON.

Notes on mutability and maps:

  • jsonContent defaults to an empty map and is never exposed as null. The getter returns an unmodifiable view.
  • When setting jsonContent with a non-null map, the reference is preserved; subsequent external modifications to the provided map are observable via getJsonContent().
  • Method Details

    • builder

      public static DocumentResponse.Builder builder()
    • toBuilder

      public DocumentResponse.Builder toBuilder()
    • getDoctagsContent

      public @Nullable String getDoctagsContent()
    • getFilename

      public String getFilename()
    • getHtmlContent

      public @Nullable String getHtmlContent()
    • getJsonContent

      public @Nullable ai.docling.api.core.DoclingDocument getJsonContent()
    • getMarkdownContent

      public @Nullable String getMarkdownContent()
    • getTextContent

      public @Nullable String getTextContent()
    • toString

      public String toString()
      Overrides:
      toString in class Object