mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-08 03:24:27 +08:00
Refs #541
Updates XML configuration to use a builder pattern instead of constructors with many parameters
This commit is contained in:
@@ -883,7 +883,10 @@ 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