json - JSON - 网络路径中的反斜杠
问题描述
我有一个返回这个 JSON 的 PHP api:
{
"recrutee": {
"recrutee_nom": "Mustermann",
"recrutee_statut": "Extern",
"recrutee_id_iam": "APP764",
"recrutee_debut_de_contrat": "2018-08-30",
"recrutee_fin_de_contrat": "2018-11-29",
"recrutee_prenom": "Max"
},
"responsable": {
"responsable_nom": "Musterman",
"responsable_prenom": "Marc",
"responsable_tel": "66666666",
"responsable_service": "It",
"responsable_email": "example@example.com"
},
"acces_reseau": [{
"path": "\\Some\Network\Path"
}],
"option_pc": [
{
"autre": "Nfc Reader"
}, {
"option": "internet"
}, {
"option": "lecteurluxtrust"
}, {
"option": "scanner"
}, {
"option": "imprimante"
}, {
"option": "ecransupplementaire"
}, {
"option": "lectuercodebarres"
}
],
"demande_id": "5b54588d00772",
"lieu": "Luxembourg City"
}
问题在于网络路径是否需要如下所示:
\\\\Some\\Network\\Path
由于反斜杠用作转义字符,因此我的原始 json 中的网络路径不正确。
是否有任何以编程方式(非手动)方式获得此结果:
\\\\Some\\Network\\Path
解决方案
推荐阅读
- python-3.x - python 在 re.search source.error("bad escape %s" % escape, len(escape)) 中使用变量
- javascript - 如何在 JavaScript 中突出显示然后复制 OLE?
- bash - MacOS Bash 脚本 - 带有日文字符的转义字符串
- java - Java/SAP HYBRIS:Java/hybris Backoffice 中的时区日期问题
- go - bufio.NewScanner 的重置方法?
- python - JSON 数据网页抓取
- flutter - 如何创建n个变量的列表?
- bash - 在 bash 中对文件进行排序
- reactjs - 未定义的参数传递给自定义反应钩子中的 fn
- javascript - 在同一文件夹中节点多个应用程序