locked
Json in body of RestRequest RRS feed

  • Question

  • User-1852975005 posted

    Hi, I need to add the below into the body of a RestRequest.

    {
          "action": "read",
          "header": {
    "requestor": "WorkOrderCreateService",
    "dateTime": "DD/MM/YYYY HH:MM:SS",
    "messagePriority": "1",
    "correlationId": ""
    },
          "payload": {
         "workOrder": {
                "workOrder": "00000032"
              
    }
          }
    }

    I have tried a number of way with no success.

    This works

      string jsonString = "'action'='read','header'={'requestor'='WorkOrderCreateService','dateTime'='DD/MM/YYYY HH:MM:SS','messagePriority'='1','correlationId'=''},'payload' = {'workOrder' = {'workOrder='00000032'}}";

    Thanks,

    Thursday, February 20, 2020 3:51 AM

Answers

  • User-1852975005 posted

    Json in body of RestRequest

    32 minutes ago|LINK|203.43.194.18

    Hi, I need to add the below into the body of a RestRequest.

    {
          "action": "read",
          "header": {
    "requestor": "WorkOrderCreateService",
    "dateTime": "DD/MM/YYYY HH:MM:SS",
    "messagePriority": "1",
    "correlationId": ""
    },
          "payload": {
         "workOrder": {
                "workOrder": "00000032"
              
    }
          }
    }

    I have tried a number of way with no success.

    This works

      string jsonString = "'action'='read','header'={'requestor'='WorkOrderCreateService','dateTime'='DD/MM/YYYY HH:MM:SS','messagePriority'='1','correlationId'=''},'payload' = {'workOrder' = {'workOrder='00000032'}}";

    Thanks,

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 20, 2020 4:24 AM