我有一个问题,我想知道是否有人可以帮助我定期表达来取代它:
Error:(54, 39) error: cannot find symbol class Configuration
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
对此:
{"name": "Raul "the cat" Gonzalez"}
为了在服务器端进行验证,我需要这个,因为我使用Web服务将JSON保存到数据库中,我希望在我的Web服务中具有这种灵活性。我的意思是我希望能够发送这个:
{"name": "Raul \"the cat\" Gonzalez"}
逻辑将其改为:
{"name": "Raul "the cat" Gonzalez"}
答案 0 :(得分:0)
JSON.stringify
完全符合您的要求:
var object = {'name': 'Raul "the cat" Gonzalez'}; // single quotes, otherwise you would need escaped double quotes already here to avoid a JavaScript error.
console.log(JSON.stringify(object));