Skip to content

XMLParserConfiguration defined json arrays option#646

Merged
stleary merged 6 commits into
stleary:masterfrom
Zetmas:feature/issue#595
Dec 4, 2021
Merged

XMLParserConfiguration defined json arrays option#646
stleary merged 6 commits into
stleary:masterfrom
Zetmas:feature/issue#595

Conversation

@Zetmas

@Zetmas Zetmas commented Nov 20, 2021

Copy link
Copy Markdown
Contributor
  • Added a member variable named Set<String> forceList to XMLParserConfiguration with corresponding constructor/getter/setter
  • After configuring forceList in XMLParserConfiguration, XML.toJSONObject will now set the corresponding values as arrays, regardless of their number of occurrences
  • If the returning value is originally "", it will be replaced by []

@Zetmas
Zetmas marked this pull request as ready for review November 20, 2021 03:39
@Zetmas Zetmas changed the title Fixes stleary/JSON-java#595 Fixes #595 How to convert a node of xml to json array Nov 20, 2021

@johnjaylward johnjaylward left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks decent enough to me. Thanks

@stleary

stleary commented Nov 24, 2021

Copy link
Copy Markdown
Owner

What problem does this code solve?
Enhancement for unconditional parsing of XML elements to array

Risks
Low

Changes to the API?
Added a new XML config option

Will this require a new release?
No

Should the documentation be updated?
Yes (Do we even have an XMLConfiguration topic?)

Does it break the unit tests?
No

Was any code refactored in this commit?
No

Review status
APPROVED

@stleary

stleary commented Nov 24, 2021

Copy link
Copy Markdown
Owner

Starting a 7 day comment window (won't be able to complete a code review rght away)

@stleary stleary changed the title Fixes #595 How to convert a node of xml to json array XMLParserConfiguration support for xml to json arrays Dec 4, 2021
@stleary
stleary merged commit cff5cc6 into stleary:master Dec 4, 2021
@stleary stleary changed the title XMLParserConfiguration support for xml to json arrays XMLParserConfiguration defined json arrays option Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants