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
  d893a9f1_90ef_72a8_214b_1f5138cb8af3["toJSONArray()"]
  c5b9bfa5_eb8b_88bc_d760_31365696ed27["length()"]
  d893a9f1_90ef_72a8_214b_1f5138cb8af3 -->|calls| c5b9bfa5_eb8b_88bc_d760_31365696ed27
  33cce6ef_fe5a_f42c_a0a4_61748dd2d49e["toString()"]
  d893a9f1_90ef_72a8_214b_1f5138cb8af3 -->|calls| 33cce6ef_fe5a_f42c_a0a4_61748dd2d49e
  3f311302_743c_0448_919e_30cb3dc18736["opt()"]
  d893a9f1_90ef_72a8_214b_1f5138cb8af3 -->|calls| 3f311302_743c_0448_919e_30cb3dc18736
  1bc3a0b6_6045_ed66_1f89_1c6fe5c3d27f["put()"]
  d893a9f1_90ef_72a8_214b_1f5138cb8af3 -->|calls| 1bc3a0b6_6045_ed66_1f89_1c6fe5c3d27f
  style d893a9f1_90ef_72a8_214b_1f5138cb8af3 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/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

Calls

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