mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-02 19:15:27 -04:00
Fix cloning of parser configuration.
This commit is contained in:
parent
50a5ce256b
commit
fd0cca3586
@ -37,6 +37,7 @@ public class JSONParserConfiguration extends ParserConfiguration {
|
||||
clone.strictMode = strictMode;
|
||||
clone.maxNestingDepth = maxNestingDepth;
|
||||
clone.keepStrings = keepStrings;
|
||||
clone.useNativeNulls = useNativeNulls;
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,14 @@ public class JSONParserConfigurationTest {
|
||||
|
||||
assertTrue(jsonParserConfiguration.isKeepStrings());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void useNativeNullsIsCloned() {
|
||||
JSONParserConfiguration jsonParserConfiguration = new JSONParserConfiguration()
|
||||
.withUseNativeNulls(true)
|
||||
.withStrictMode(true);
|
||||
assertTrue(jsonParserConfiguration.isUseNativeNulls());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void verifyDuplicateKeyThenMaxDepth() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user