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 c61e7c16_ac86_0cff_fee3_0fcd0441abf1["string()"] d5728516_edfd_11b6_90c1_8de8274cc06a["value()"] d5728516_edfd_11b6_90c1_8de8274cc06a -->|calls| c61e7c16_ac86_0cff_fee3_0fcd0441abf1 11c8f4f1_fcc9_aa57_6558_2f774878d7a3["key()"] 11c8f4f1_fcc9_aa57_6558_2f774878d7a3 -->|calls| c61e7c16_ac86_0cff_fee3_0fcd0441abf1 style c61e7c16_ac86_0cff_fee3_0fcd0441abf1 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/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