docling-project / docling-project/docling-java

`@JsonInclude(NON_EMPTY)` makes DoclingDocument serialization lossy

Đang mở
#598 9 bình luận 1 reaction 2 người được giao Được @edeandrea nhận Xem trên GitHub
Ngôn ngữ chính
Java
Star
134
Fork
26
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
47

Mô tả

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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.