mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 11:25:30 -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.strictMode = strictMode;
|
||||||
clone.maxNestingDepth = maxNestingDepth;
|
clone.maxNestingDepth = maxNestingDepth;
|
||||||
clone.keepStrings = keepStrings;
|
clone.keepStrings = keepStrings;
|
||||||
|
clone.useNativeNulls = useNativeNulls;
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,14 @@ public class JSONParserConfigurationTest {
|
|||||||
|
|
||||||
assertTrue(jsonParserConfiguration.isKeepStrings());
|
assertTrue(jsonParserConfiguration.isKeepStrings());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void useNativeNullsIsCloned() {
|
||||||
|
JSONParserConfiguration jsonParserConfiguration = new JSONParserConfiguration()
|
||||||
|
.withUseNativeNulls(true)
|
||||||
|
.withStrictMode(true);
|
||||||
|
assertTrue(jsonParserConfiguration.isUseNativeNulls());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void verifyDuplicateKeyThenMaxDepth() {
|
public void verifyDuplicateKeyThenMaxDepth() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user