docling-project / docling-project/docling-java

`@JsonInclude(NON_EMPTY)` makes DoclingDocument serialization lossy

オープン
#598 コメント 9 件 リアクション 1 件 担当者 2 名 @edeandrea が担当を希望しています GitHub で見る
主要言語
Java
スター
134
フォーク
26
平均マージ
12時間 25分
マージ済み PR(30日)
45

説明

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)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。