mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
Merge pull request #49 from madsager/master
Add test that an invalid escape sequence results in a JSONException a…
This commit is contained in:
commit
40f170b508
1 changed files with 6 additions and 0 deletions
|
@ -1924,4 +1924,10 @@ public class JSONObjectTest {
|
||||||
public void optQueryWithSyntaxError() {
|
public void optQueryWithSyntaxError() {
|
||||||
new JSONObject().optQuery("invalid");
|
new JSONObject().optQuery("invalid");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expected = JSONException.class)
|
||||||
|
public void invalidEscapeSequence() {
|
||||||
|
String json = "{ \"\\url\": \"value\" }";
|
||||||
|
new JSONObject(json);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue