我创建了一个 json,并尝试从我的 json 中删除后退堆栈图标"\"。
{"Brand":"Assemble Computer","Issue with device":"Power Code/VGA","Problem in":"{"0":"HDD","1":"SSD","2":"DVD writer","3":"Keyboard Mouse","4":"Monitor"}","Model":"dddff"}
在这个 JSON 中,我尝试删除键中的问题中的"\" 我该怎么做?
也许使用正则表达式并替换?
final String regex = "\\\"";
String originalJson = ... (your json);
String newJson = originalJson.replaceAll(regex, """);
这将用常规的 quoataions 替换所有转义的 quoataions......