mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 11:25:30 -04: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
@ -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…
x
Reference in New Issue
Block a user