locked
How to pass Json data with special character to API RRS feed

  • Question

  • User-893002196 posted

    Hi All,

    I have Json data that  want to pass to API. However the " in the description caused failure. How to use regex to handle single quote & etc special character?

    Example Json File:

    [
      {
        "ID": 0,
        "Date": "2020-09-10T09:43:22.843Z",
        "Requestor": "xxx",
        "Description": "Windows 6.1" Iphone XR, +1-Carbon' for site...",
        "Qty": "xx",
        "Currency": "xx",
        "Price": 0,
        "Supplier": "xx",
        "UniqueId": "ddd"
      }
    ]

    Please advise.

    Thanks

    Regards,

    Micheale

    Thursday, September 10, 2020 12:21 PM

Answers

  • User475983607 posted

    Typically, the quote is escaped or encoded.

    [ 
      {
        "ID": 0,
        "Date": "2020-09-10T09:43:22.843Z",
        "Requestor": "xxx",
        "Description": "Windows 6.1\" Iphone XR, +1-Carbon' for site...",
        "Qty": "xx",
        "Currency": "xx",
        "Price": 0,
        "Supplier": "xx",
        "UniqueId": "ddd"
      }
    ]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 10, 2020 12:45 PM