目的
Java字符串标准输出打印包含双引号方法方法
将要打印的双引号进行转义代码
@SpringBootTest(classes = {SpringTestApplication.class})
class SpringTestApplicationTests {
@Test
void contextLoads() {
String str = "{\"key\":\"value\"}";
System.out.println(str);
}
}效果
{"key":"value"}
















