FasterXML / jackson-dataformat-xml

Extension for Jackson JSON processor that adds support for serializing POJOs as XML (and deserializing from XML) as an alternative to JSON
Apache License 2.0
567 stars 221 forks source link

support StreamReadContraints maxStringSize #571

Closed pjfanning closed 1 year ago

pjfanning commented 1 year ago
cowtowncoder commented 1 year ago

Yeah. FWTW, Woodstox does have limits via:

https://cowtowncoder.medium.com/configuring-woodstox-xml-parser-woodstox-specific-properties-1ce5030a5173

including P_MAX_TEXT_LENGTH, but integrating that would be tricky.

So one possibility would be documentation.

In theory it'd be possible to -- with quite a bit of work -- change handling to avoid automatic text coalescing, which would usually make Stax implementation return text segments in smaller chunks. But that seems like a lot of work for questionable benefit. Plus it'd work at sort of wrong level too (in XML token stream, before becoming values).

So perhaps it may be necessary to just document which format backends do support StreamReadConstraints, in README.md of this and other dataformat repos.