docling-project / docling-project/docling-java

`@JsonInclude(NON_EMPTY)` makes DoclingDocument serialization lossy

Abierto
#598 9 comentarios 1 reacción 2 asignados Reclamado por @edeandrea Ver en GitHub
Lenguaje dominante
Java
Estrellas
134
Forks
26
Merge medio
12 h 25 min
PR fusionados (30 d)
45

Descripción

Serve keeps `"text": ""` on formula items (`do_formula_enrichment=false`). The Java `DoclingDocument` still has text as `""`, but serialization drops it:

```java
DoclingDocument doc = response.getDocument().getJsonContent();
// doc still has text == ""
byte[] bytes = jsonMapper.writeValueAsBytes(doc); // "text" omitted in JSON
```

`Include.ALWAYS` on the mapper does not help — class-level `@JsonInclude(NON_EMPTY)` wins. No raw `json_content` accessor either.

Wanted: lossless serialize, or `raw json_content` `bytes`/`JsonNode`.

Related: [docling#3780](https://github.com/docling-project/docling/issues/3780), [docling-java#386](https://github.com/docling-project/docling-java/issues/386)

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.