`@JsonInclude(NON_EMPTY)` makes DoclingDocument serialization lossy
@edeandrea is already working on this.
Since Jul 20, 2026.
- #603 by @copilot-swe-agent — closed without merging
Assessment
This issue has not been assessed yet.
Description
Serve keeps "text": "" on formula items (do_formula_enrichment=false). The Java DoclingDocument still has text as "", but serialization drops it:
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, docling-java#386
- Dominant language
- Java
- Stars
- 136
- Forks
- 26
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 47
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docling-project/docling-java
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
docling-project/docling-java#664 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
docling-project/docling-java#557 · 3 comments ·
-
area:docling-serve documentation good first issue help wanted module:docling-core module:docling-serve-api module:docling-serve-client module:docling-testcontainers
Difficulty 4/5 3-5 days Newbie friendliness 35/100
docling-project/docling-java#350 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
docling-project/docling-java#184 · 5 comments ·
-
automation enhancement module:version-tester
docling-project/docling-java#134 · 2 comments · 1 assignee ·
All issues in docling-project/docling-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100