Read the next element of the JSON input stream as an object property name. @return JSON object property name @throws JsonException if the next element isn't a string followed by a colon @throws UncheckedIOException if an I/O exception is encountered
()
| 193 | * @throws UncheckedIOException if an I/O exception is encountered |
| 194 | */ |
| 195 | public String nextName() { |
| 196 | expect(JsonType.NAME); |
| 197 | |
| 198 | String name = readString(); |
| 199 | skipWhitespace(input); |
| 200 | int read = input.read(); |
| 201 | if (read != ':') { |
| 202 | throw new JsonException( |
| 203 | "Unable to read name. Expected colon separator, but saw '" + (char) read + "'"); |
| 204 | } |
| 205 | return name; |
| 206 | } |
| 207 | |
| 208 | /** |
| 209 | * Read the next element of the JSON input stream as a {@code null} object. |