Revert changes with feature and refactor together.

This commit is contained in:
rudrajyoti biswas
2023-10-19 10:28:11 +05:30
parent 7b2677ac5a
commit 1d0775cce7
8 changed files with 176 additions and 322 deletions

View File

@@ -733,7 +733,7 @@ public class XMLConfigurationTest {
@Test
public void testToJSONArray_jsonOutput() {
final String originalXml = "<root><id>01</id><id>1</id><id>00</id><id>0</id><item id=\"01\"/><title>True</title></root>";
final JSONObject expected = new JSONObject("{\"root\":{\"item\":{\"id\":1},\"id\":[1,1,0,0],\"title\":true}}");
final JSONObject expected = new JSONObject("{\"root\":{\"item\":{\"id\":\"01\"},\"id\":[\"01\",1,\"00\",0],\"title\":true}}");
final JSONObject actualJsonOutput = XML.toJSONObject(originalXml,
new XMLParserConfiguration().withKeepStrings(false));
Util.compareActualVsExpectedJsonObjects(actualJsonOutput,expected);