docling-project / docling-project/docling-java

`@JsonInclude(NON_EMPTY)` makes DoclingDocument serialization lossy

Ouverte
#598 9 commentaires 1 réaction 2 personnes assignées Réclamée par @edeandrea Voir sur GitHub
Langage dominant
Java
Étoiles
134
Forks
26
Merge moyen
1 j 1 h
PR mergées (30 j)
47

Description

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)

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.