search

Home  >  Q&A  >  body text

Backslash present in Json

The json parsing result is null

Simulated json data:

{
"Json parsing":"Support formatting highlight folding",
"Support XML conversion":"Support XML conversion to Json, Json to XML",
"Json format verification": "More detailed and accurate error messages",
"medicine_size": "1.5\ml"
}

The problem is that \ cannot appear alone. I can only use str_replace() to replace this single backslash. How to avoid this problem in general development?

高洛峰高洛峰2810 days ago879

reply all(1)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-16 13:05:52

    You can try transcoding

    reply
    0
  • Cancelreply