JSON-网络路径中的反斜杠

时间:2018-07-22 10:23:48

标签: json

我有一个PHP API,它返回以下JSON:

{
    "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

0 个答案:

没有答案
相关问题