Parses any JSON-parseable object, returning the value.
()
| 58 | * Parses any JSON-parseable object, returning the value. |
| 59 | */ |
| 60 | public Object parse() throws ParseException { |
| 61 | Object toReturn = anything(); |
| 62 | if (!ensureEOF()) { |
| 63 | throw new IllegalStateException("Expected EOF, but still had content to parse"); |
| 64 | } |
| 65 | return toReturn; |
| 66 | } |
| 67 | |
| 68 | private static String substringBefore(String str, char delim) { |
| 69 | int pos = str.indexOf(delim); |