mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
Revert "Merge pull request #877 from rikkarth/feat/871-strictMode"
This reverts commitd02ac0f2a3, reversing changes made tocfd47615d0.
This commit is contained in:
@@ -220,12 +220,12 @@ public class JSONObject {
|
||||
for (;;) {
|
||||
c = x.nextClean();
|
||||
switch (c) {
|
||||
case 0:
|
||||
throw x.syntaxError("A JSONObject text must end with '}'");
|
||||
case '}':
|
||||
return;
|
||||
default:
|
||||
key = x.nextSimpleValue(c, jsonParserConfiguration).toString();
|
||||
case 0:
|
||||
throw x.syntaxError("A JSONObject text must end with '}'");
|
||||
case '}':
|
||||
return;
|
||||
default:
|
||||
key = x.nextSimpleValue(c).toString();
|
||||
}
|
||||
|
||||
// The key is followed by ':'.
|
||||
@@ -244,7 +244,7 @@ public class JSONObject {
|
||||
throw x.syntaxError("Duplicate key \"" + key + "\"");
|
||||
}
|
||||
|
||||
Object value = x.nextValue(jsonParserConfiguration);
|
||||
Object value = x.nextValue();
|
||||
// Only add value if non-null
|
||||
if (value != null) {
|
||||
this.put(key, value);
|
||||
@@ -1247,7 +1247,7 @@ public class JSONObject {
|
||||
static BigDecimal objectToBigDecimal(Object val, BigDecimal defaultValue) {
|
||||
return objectToBigDecimal(val, defaultValue, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param val value to convert
|
||||
* @param defaultValue default value to return is the conversion doesn't work or is null.
|
||||
|
||||
Reference in New Issue
Block a user