readObject() — spring-boot Function Reference
Architecture documentation for the readObject() function in JSONTokener.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 893d015b_6dbc_f3e6_7bc9_d3ea1284a481["readObject()"] 87e46e8d_3da0_7f48_7371_9287ac91a438["nextValue()"] 87e46e8d_3da0_7f48_7371_9287ac91a438 -->|calls| 893d015b_6dbc_f3e6_7bc9_d3ea1284a481 8fab3eb9_87b1_0170_dc8c_7fff92dfe65b["nextCleanInternal()"] 893d015b_6dbc_f3e6_7bc9_d3ea1284a481 -->|calls| 8fab3eb9_87b1_0170_dc8c_7fff92dfe65b 87e46e8d_3da0_7f48_7371_9287ac91a438["nextValue()"] 893d015b_6dbc_f3e6_7bc9_d3ea1284a481 -->|calls| 87e46e8d_3da0_7f48_7371_9287ac91a438 2ea9368b_02eb_2d26_b6e7_aaf2153de2a0["syntaxError()"] 893d015b_6dbc_f3e6_7bc9_d3ea1284a481 -->|calls| 2ea9368b_02eb_2d26_b6e7_aaf2153de2a0 style 893d015b_6dbc_f3e6_7bc9_d3ea1284a481 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
configuration-metadata/spring-boot-configuration-metadata/src/json-shade/java/org/springframework/boot/configurationmetadata/json/JSONTokener.java lines 354–402
private JSONObject readObject() throws JSONException {
JSONObject result = new JSONObject();
/* Peek to see if this is the empty object. */
int first = nextCleanInternal();
if (first == '}') {
return result;
}
else if (first != -1) {
this.pos--;
}
while (true) {
Object name = nextValue();
if (!(name instanceof String)) {
if (name == null) {
throw syntaxError("Names cannot be null");
}
else {
throw syntaxError(
"Names must be strings, but " + name + " is of type " + name.getClass().getName());
}
}
/*
* Expect the name/value separator to be either a colon ':', an equals sign
* '=', or an arrow "=>". The last two are bogus but we include them because
* that's what the original implementation did.
*/
int separator = nextCleanInternal();
if (separator != ':' && separator != '=') {
throw syntaxError("Expected ':' after " + name);
}
if (this.pos < this.in.length() && this.in.charAt(this.pos) == '>') {
this.pos++;
}
result.put((String) name, nextValue());
switch (nextCleanInternal()) {
case '}':
return result;
case ';', ',':
continue;
default:
throw syntaxError("Unterminated object");
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does readObject() do?
readObject() is a function in the spring-boot codebase.
What does readObject() call?
readObject() calls 3 function(s): nextCleanInternal, nextValue, syntaxError.
What calls readObject()?
readObject() is called by 1 function(s): nextValue.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free