mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-25 00:00:38 -05:00
Merge pull request #543 from johnjaylward/RefactorXmlConfiguration
Refactor XMLConfiguration to use Builder Pattern
This commit is contained in:
@@ -893,7 +893,11 @@ public class XMLTest {
|
||||
final String originalXml = "<root><id xsi:nil=\"true\"/></root>";
|
||||
final String expectedJsonString = "{\"root\":{\"id\":null}}";
|
||||
|
||||
final JSONObject json = XML.toJSONObject(originalXml, new XMLParserConfiguration(false, "content", true));
|
||||
final JSONObject json = XML.toJSONObject(originalXml,
|
||||
new XMLParserConfiguration()
|
||||
.withKeepStrings(false)
|
||||
.withcDataTagName("content")
|
||||
.withConvertNilAttributeToNull(true));
|
||||
assertEquals(expectedJsonString, json.toString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user