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

Feature : Allow setting custom linefeed on DefaultXmlPrettyPrinter #568

Closed JooHyukKim closed 1 year ago

JooHyukKim commented 1 year ago

BEFORE

AFTER

pjfanning commented 1 year ago

I have to ask why you are not ensuring the code compiles?

The @Override should not have been added to the new lineFeed() method. In fact, it should not even be necessary. It is likely that Lf2SpacesIndenter can access the defaultXmlPrettyPrinter._lineFeed.

JooHyukKim commented 1 year ago

I have to ask why you are not ensuring the code compiles?

The @Override should not have been added to the new lineFeed() method. In fact, it should not even be necessary. It is likely that Lf2SpacesIndenter can access the defaultXmlPrettyPrinter._lineFeed.

JooHyukKim commented 1 year ago

Sorry it took me long to react! 🙏🏼 I just moved house 🥲🥲🥲 and it's taking so much time to pack and unpack stuff

I just got internet back, I will try to apply your feed back asap.

JooHyukKim commented 1 year ago

All reviews made up to this point are applied to the changes.

The only thing left is being discussed in the thread of comments above. Simply put, about how to(or whether) to apply custom new line while writing XML declaration with ToXmlGenerator.Feature.WRITE_XML_DECLARATION or not.

cowtowncoder commented 1 year ago

Thank you again @JooHyukKim ! Merged for inclusion in 2.15.0