Home / Function/ readObject() — spring-boot Function Reference

readObject() — spring-boot Function Reference

Architecture documentation for the readObject() function in JSONTokener.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 3 called by 1

Entity Profile

Dependency Diagram

graph TD
  222f475a_e60c_57a7_5fec_ce6fe2f5deda["readObject()"]
  e00d01c8_1ae8_f530_0266_0863c164a433["nextValue()"]
  e00d01c8_1ae8_f530_0266_0863c164a433 -->|calls| 222f475a_e60c_57a7_5fec_ce6fe2f5deda
  ba2b4b5f_53d3_e7ca_09c7_5b89f2ff6a13["nextCleanInternal()"]
  222f475a_e60c_57a7_5fec_ce6fe2f5deda -->|calls| ba2b4b5f_53d3_e7ca_09c7_5b89f2ff6a13
  e00d01c8_1ae8_f530_0266_0863c164a433["nextValue()"]
  222f475a_e60c_57a7_5fec_ce6fe2f5deda -->|calls| e00d01c8_1ae8_f530_0266_0863c164a433
  424682c6_51c3_cdab_a5b5_25e0f9a6d8eb["syntaxError()"]
  222f475a_e60c_57a7_5fec_ce6fe2f5deda -->|calls| 424682c6_51c3_cdab_a5b5_25e0f9a6d8eb
  style 222f475a_e60c_57a7_5fec_ce6fe2f5deda fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

configuration-metadata/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/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

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