Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将从服务器接收此值作为字符串值
String responserecivied = {"dummyuser":{"Number":1,"CUSID":1}}
是否可以从上面的字符串中删除第一个和最后一个大括号,使其看起来像
"dummyuser":{"Number":1,"CUSID":1}
有可能的:
String s = yourString.substring(1, yourString.length() - 1);
但是,请注意您的字符串实际上是 JSON,因此您可能需要使用 JSON 阅读器对其进行解析。