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

beforeValue() — spring-boot Function Reference

Architecture documentation for the beforeValue() function in JSONStringer.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 3 called by 2

Entity Profile

Dependency Diagram

graph TD
  d1b30bcd_285c_293e_1e7e_4dea1cefb8c1["beforeValue()"]
  576d3552_6245_00ed_0f1d_0b49083fbc99["open()"]
  576d3552_6245_00ed_0f1d_0b49083fbc99 -->|calls| d1b30bcd_285c_293e_1e7e_4dea1cefb8c1
  2ce2d03e_71eb_626c_9b4f_450ef5dc5b79["value()"]
  2ce2d03e_71eb_626c_9b4f_450ef5dc5b79 -->|calls| d1b30bcd_285c_293e_1e7e_4dea1cefb8c1
  e532399d_15ce_1aa0_3023_65e4c0f2706a["peek()"]
  d1b30bcd_285c_293e_1e7e_4dea1cefb8c1 -->|calls| e532399d_15ce_1aa0_3023_65e4c0f2706a
  a884604b_2d69_5510_5230_05bfd672dfd9["replaceTop()"]
  d1b30bcd_285c_293e_1e7e_4dea1cefb8c1 -->|calls| a884604b_2d69_5510_5230_05bfd672dfd9
  fde32a20_30b1_e5ec_2935_875f5d28ca41["newline()"]
  d1b30bcd_285c_293e_1e7e_4dea1cefb8c1 -->|calls| fde32a20_30b1_e5ec_2935_875f5d28ca41
  style d1b30bcd_285c_293e_1e7e_4dea1cefb8c1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

cli/spring-boot-cli/src/json-shade/java/org/springframework/boot/cli/json/JSONStringer.java lines 391–412

	private void beforeValue() throws JSONException {
		if (this.stack.isEmpty()) {
			return;
		}

		Scope context = peek();
		if (context == Scope.EMPTY_ARRAY) { // first in array
			replaceTop(Scope.NONEMPTY_ARRAY);
			newline();
		}
		else if (context == Scope.NONEMPTY_ARRAY) { // another in array
			this.out.append(',');
			newline();
		}
		else if (context == Scope.DANGLING_KEY) { // value for key
			this.out.append(this.indent == null ? ":" : ": ");
			replaceTop(Scope.NONEMPTY_OBJECT);
		}
		else if (context != Scope.NULL) {
			throw new JSONException("Nesting problem");
		}
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does beforeValue() do?
beforeValue() is a function in the spring-boot codebase.
What does beforeValue() call?
beforeValue() calls 3 function(s): newline, peek, replaceTop.
What calls beforeValue()?
beforeValue() is called by 2 function(s): open, value.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free