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 bfecd7ed_4ec2_1eca_3ac0_a644aa4d808b["readObject()"] 9d280377_39f9_945d_4b0c_8be3562c4bd5["nextValue()"] 9d280377_39f9_945d_4b0c_8be3562c4bd5 -->|calls| bfecd7ed_4ec2_1eca_3ac0_a644aa4d808b 4a327d15_c9d7_fbe1_89b7_43cf755708ae["nextCleanInternal()"] bfecd7ed_4ec2_1eca_3ac0_a644aa4d808b -->|calls| 4a327d15_c9d7_fbe1_89b7_43cf755708ae 9d280377_39f9_945d_4b0c_8be3562c4bd5["nextValue()"] bfecd7ed_4ec2_1eca_3ac0_a644aa4d808b -->|calls| 9d280377_39f9_945d_4b0c_8be3562c4bd5 5d37c1ba_6649_7ef7_7cb2_9bcac45ebb3e["syntaxError()"] bfecd7ed_4ec2_1eca_3ac0_a644aa4d808b -->|calls| 5d37c1ba_6649_7ef7_7cb2_9bcac45ebb3e style bfecd7ed_4ec2_1eca_3ac0_a644aa4d808b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
cli/spring-boot-cli/src/json-shade/java/org/springframework/boot/cli/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