remove-jsonparserconfig-ctor - just use the withOverwriteDuplicateKey() method

This commit is contained in:
Sean Leary
2024-03-09 09:15:53 -06:00
parent 712859d771
commit dab29ec1d5
2 changed files with 5 additions and 14 deletions

View File

@@ -18,7 +18,8 @@ public class JSONParserConfigurationTest {
@Test
public void testOverwrite() {
JSONObject jsonObject = new JSONObject(TEST_SOURCE, new JSONParserConfiguration(true));
JSONObject jsonObject = new JSONObject(TEST_SOURCE,
new JSONParserConfiguration().withOverwriteDuplicateKey(true));
assertEquals("duplicate key should be overwritten", "value2", jsonObject.getString("key"));
}