string() — spring-boot Function Reference
Architecture documentation for the string() function in JSONStringer.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 8e01b66e_3088_391c_7224_2c5acfeeb5a9["string()"] 2ce2d03e_71eb_626c_9b4f_450ef5dc5b79["value()"] 2ce2d03e_71eb_626c_9b4f_450ef5dc5b79 -->|calls| 8e01b66e_3088_391c_7224_2c5acfeeb5a9 65076e4d_26f9_55c7_e58b_d2e3df1292a7["key()"] 65076e4d_26f9_55c7_e58b_d2e3df1292a7 -->|calls| 8e01b66e_3088_391c_7224_2c5acfeeb5a9 style 8e01b66e_3088_391c_7224_2c5acfeeb5a9 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 313–342
private void string(String value) {
this.out.append("\"");
for (int i = 0, length = value.length(); i < length; i++) {
char c = value.charAt(i);
/*
* From RFC 4627, "All Unicode characters may be placed within the quotation
* marks except for the characters that must be escaped: quotation mark,
* reverse solidus, and the control characters (U+0000 through U+001F)."
*/
switch (c) {
case '"', '\\', '/' -> this.out.append('\\').append(c);
case '\t' -> this.out.append("\\t");
case '\b' -> this.out.append("\\b");
case '\n' -> this.out.append("\\n");
case '\r' -> this.out.append("\\r");
case '\f' -> this.out.append("\\f");
default -> {
if (c <= 0x1F) {
this.out.append(String.format("\\u%04x", (int) c));
}
else {
this.out.append(c);
}
}
}
}
this.out.append("\"");
}
Domain
Subdomains
Source
Frequently Asked Questions
What does string() do?
string() is a function in the spring-boot codebase.
What calls string()?
string() is called by 2 function(s): key, value.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free