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

toJSONArray() — spring-boot Function Reference

Architecture documentation for the toJSONArray() function in JSONObject.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  367dbc3b_775c_0799_b485_713226c4cf4b["toJSONArray()"]
  75fd2205_825e_5b49_0235_007ef313bd48["length()"]
  367dbc3b_775c_0799_b485_713226c4cf4b -->|calls| 75fd2205_825e_5b49_0235_007ef313bd48
  73772166_be2f_6e41_7132_c7cc2d941d4a["toString()"]
  367dbc3b_775c_0799_b485_713226c4cf4b -->|calls| 73772166_be2f_6e41_7132_c7cc2d941d4a
  9b48d642_1484_2fc4_4698_b4b6309c2e72["opt()"]
  367dbc3b_775c_0799_b485_713226c4cf4b -->|calls| 9b48d642_1484_2fc4_4698_b4b6309c2e72
  e3be2238_5db5_c42d_7dea_fc316e36c89c["put()"]
  367dbc3b_775c_0799_b485_713226c4cf4b -->|calls| e3be2238_5db5_c42d_7dea_fc316e36c89c
  style 367dbc3b_775c_0799_b485_713226c4cf4b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

cli/spring-boot-cli/src/json-shade/java/org/springframework/boot/cli/json/JSONObject.java lines 653–667

	public JSONArray toJSONArray(JSONArray names) {
		JSONArray result = new JSONArray();
		if (names == null) {
			return null;
		}
		int length = names.length();
		if (length == 0) {
			return null;
		}
		for (int i = 0; i < length; i++) {
			String name = JSON.toString(names.opt(i));
			result.put(opt(name));
		}
		return result;
	}

Domain

Subdomains

Frequently Asked Questions

What does toJSONArray() do?
toJSONArray() is a function in the spring-boot codebase.
What does toJSONArray() call?
toJSONArray() calls 4 function(s): length, opt, put, toString.

Analyze Your Own Codebase

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

Try Supermodel Free