stleary / JSON-java

A reference implementation of a JSON package in Java.
http://stleary.github.io/JSON-java/index.html
Other
4.54k stars 2.56k forks source link

Close XML tag explicitly for empty tags with configuration. #820

Closed rudrajyotib closed 1 year ago

rudrajyotib commented 1 year ago

Added configuration option - closeEmptyTag When this flag is set to true, all the empty tags will be closed using explicit start and end tag.

rudrajyotib commented 1 year ago

@stleary - mvn:test is failing for java 11 execution, which seems to be a one-off and temporary problem. Can the CI steps be executed once more please. I have run the tests locally with Java versions 8, 11, 17 and they do not fail. I think another run should mark it clear, if not, I will look into it.

stleary commented 1 year ago

Fixes #748

@rudrajyotib Looks good, just one comment to address.

rudrajyotib commented 1 year ago

@stleary - updated configuration builder and added test cases.

stleary commented 1 year ago

What problem does this code solve? Fixes a request made to support optional alternate XML close tags

Does the code still compile with Java6? Yes

Risks Low

Changes to the API? Adds a new XMLParserConfiguration property

Will this require a new release? No

Should the documentation be updated? No

Does it break the unit tests? No, new unit tests were added

Was any code refactored in this commit? No

Review status APPROVED

Starting 3-day comment window