diff --git a/JSONTokener.java b/JSONTokener.java index d0b197d73..fac73e9d4 100644 --- a/JSONTokener.java +++ b/JSONTokener.java @@ -264,8 +264,6 @@ public String nextString(char quote) throws JSONException { c = this.next(); switch (c) { case 0: - case '\n': - case '\r': throw this.syntaxError("Unterminated string"); case '\\': c = this.next(); @@ -324,7 +322,7 @@ public String nextTo(char delimiter) throws JSONException { StringBuilder sb = new StringBuilder(); for (;;) { char c = this.next(); - if (c == delimiter || c == 0 || c == '\n' || c == '\r') { + if (c == delimiter || c == 0) { if (c != 0) { this.back(); } @@ -348,8 +346,7 @@ public String nextTo(String delimiters) throws JSONException { StringBuilder sb = new StringBuilder(); for (;;) { c = this.next(); - if (delimiters.indexOf(c) >= 0 || c == 0 || - c == '\n' || c == '\r') { + if (delimiters.indexOf(c) >= 0 || c == 0) { if (c != 0) { this.back(); }