title: JSON data in Web_custom_request- Vugen
body: <p>LR script throws warning and fails for the JSON Response.</p>
  
  <p>Below is the script</p>
  
  <p>char *request_json_base;</p>
  
  <p>char *request_json;</p>
  
  <p>web_add_header("Content-Type", "application/json; charset=utf-8");</p>
  
  <pre><code>request_json_base=  "{\"GLDefaultId\":0,\"ProjectId\":{ContactProjectId},\"CoaMainId\":10,\"UserId\":{UserId},\"Notes\":\"\",\"PRO_GLDefaultValue\":[{\"GLDefaultValueId\":0,\"GLDefaultId\":0,\"SegmentId\":16,\"Alias\":\"ACT\",\"SegmentType\":\"DETAIL\",\"FunctionTypeId\":0,\"Value\":\"&amp;&amp;&amp;\",\"Mask\":\"&amp;&amp;&amp;\",\"IsRequired\":true,\"LastModified\":null,\"IsCoaRequired\":true},{\"GLDefaultValueId\":0,\"GLDefaultId\":0,\"SegmentId\":17,\"Alias\":\"ST\",\"SegmentType\":\"SET\",\"FunctionTypeId\":0,\"Value\":\"&amp;&amp;\",\"Mask\":\"&amp;&amp;\",\"IsRequired\":false,\"LastModified\":null,\"IsCoaRequired\":false}]}",
  </code></pre>
  
  <p>request_json = lr_eval_string(request_json_base);</p>
  
  <p>lr_save_string(request_json, "REQUEST_JSON_PARAM");</p>
  
  <pre><code>web_custom_request("PRO_GLDefault",
      "URL=https://{URL}/PayrollWebApi/V1/PRO_GLDefault?userId={UserId}",
      "Method=POST",
      "TargetFrame=",
      "Resource=0",
      "RecContentType=application/json",
      "Referer=",
      "Snapshot=t299.inf",
      "Mode=HTML",
      "EncType=application/json",
      "Body={REQUEST_JSON_PARAM}",
  LAST); 
  </code></pre>
  
  <p><strong>Below is  Replay Log :</strong></p>
  
  <p>Action3_SUNP_ProjectSetup_RatesandSetupInfo.c(81): Warning: The string '"GLDefaultValueId":0,"GLDefaultId":0,"SegmentId":16,"Alias":"ACT","SegmentType":"DETAIL","FunctionTypeId":0,"Value":"&amp;&amp;&amp;","Mask":"&amp;&amp;&amp;","IsRequired":true,"LastModified":null,"IsCoaRequired":true' <strong><em>with parameter delimiters is not a parameter.</em></strong></p>
  
  <p>Action3_SUNP_ProjectSetup_RatesandSetupInfo.c(81): Warning: The string '"GLDefaultValueId":0,"GLDefaultId":0,"SegmentId":17,"Alias":"ST","SegmentType":"SET","FunctionTypeId":0,"Value":"&amp;&amp;","Mask":"&amp;&amp;","IsRequired":false,"LastModified":null,"IsCoaRequired":false' <strong><em>with parameter delimiters is not a parameter.</em></strong></p>
  
  <p>Action3_SUNP_ProjectSetup_RatesandSetupInfo.c(83): Notify: Saving Parameter "REQUEST_JSON_PARAM = {"GLDefaultId":0,"ProjectId":1810,"CoaMainId":10,"UserId":67,"Notes":"","PRO_GLDefaultValue":[{"GLDefaultValueId":0,"GLDefaultId":0,"SegmentId":16,"Alias":"ACT","SegmentType":"DETAIL","FunctionTypeId":0,"Value":"&amp;&amp;&amp;","Mask":"&amp;&amp;&amp;","IsRequired":true,"LastModified":null,"IsCoaRequired":true},{"GLDefaultValueId":0,"GLDefaultId":0,"SegmentId":17,"Alias":"ST","SegmentType":"SET","FunctionTypeId":0,"Value":"&amp;&amp;","Mask":"&amp;&amp;","IsRequired":false,"LastModified":null,"IsCoaRequired":false}]}".</p>
  
  <p><strong>Action3_SUNP_ProjectSetup_RatesandSetupInfo.c(85):     {"$id":"1","Message":"An error has occurred."}</strong></p>
  
  <p><strong>Below is Body of Original Request call:</strong>   </p>
  
  <p>"Body={\"GLDefaultId\":0,\"ProjectId\":{ContactProjectId},\"CoaMainId\":10,\"UserId\":{UserId},\"Notes\":\"\",\"PRO_GLDefaultValue\":[{\"GLDefaultValueId\":0,\"GLDefaultId\":0,\"SegmentId\":16,\"Alias\":\"ACT\",\"SegmentType\":\"DETAIL\",\"FunctionTypeId\":0,\"Value\":\"&amp;&amp;&amp;\",\"Mask\":\"&amp;&amp;&amp;\",\"IsRequired\":true,\"LastModified\":null,\"IsCoaRequired\":true},{\"GLDefaultValueId\":0,\"GLDefaultId\":0,\"SegmentId\":17,\"Alias\":\"ST\",\"SegmentType\":\"SET\",\"FunctionTypeId\":0,\"Value\":\"&amp;&amp;\",\"Mask\":\"&amp;&amp;\",\"IsRequired\":false,\"LastModified\":null,\"IsCoaRequired\":false}]}",
          LAST); </p>
  
  <p><strong>Below is the Successful Response during the recording:</strong></p>
  
  <p><strong><em>Request</em></strong> : 
  {
      "GLDefaultId": 0,
      "ProjectId": 1806,
      "CoaMainId": 10,
      "UserId": 2,
      "Notes": "",
      "PRO_GLDefaultValue": [
              {
                  "GLDefaultValueId": 0,
                  "GLDefaultId": 0,
                  "SegmentId": 16,
                  "Alias": "ACT",
                  "SegmentType": "DETAIL",
                  "FunctionTypeId": 0,
                  "Value": "&amp;&amp;&amp;",
                  "Mask": "&amp;&amp;&amp;",
                  "IsRequired": true,
                  "LastModified": null,
                  "IsCoaRequired": true
              },
              {
                  "GLDefaultValueId": 0,
                  "GLDefaultId": 0,
                  "SegmentId": 17,
                  "Alias": "ST",
                  "SegmentType": "SET",
                  "FunctionTypeId": 0,
                  "Value": "&amp;&amp;",
                  "Mask": "&amp;&amp;",
                  "IsRequired": false,
                  "LastModified": null,
                  "IsCoaRequired": false
              }
          ]
  }</p>
  
  <p><strong><em>Response:</em></strong>
  {
      "$id": "1",
      "GLDefaultId": 1,
      "ProjectId": 1806,
      "CoaMainId": 10,
      "Notes": "",
      "PRO_GLDefaultValue": [
              {
                  "$id": "2",
                  "GLDefaultValueId": 1,
                  "GLDefaultId": 1,
                  "Alias": "ACT",
                  "FunctionTypeId": 0,
                  "Value": "&amp;&amp;&amp;",
                  "SegmentId": 16,
                  "IsRequired": true,
                  "ModifiedOn": "7/1/2017 4:48:06 PM",
                  "ModifiedBy": 2,
                  "PRO_GLDefault": {
                          "$ref": "1"
                      },
                  "LastModified": null
              },
              {
                  "$id": "3",
                  "GLDefaultValueId": 2,
                  "GLDefaultId": 1,
                  "Alias": "ST",
                  "FunctionTypeId": 0,
                  "Value": "&amp;&amp;",
                  "SegmentId": 17,
                  "IsRequired": false,
                  "ModifiedOn": "7/1/2017 4:48:06 PM",
                  "ModifiedBy": 2,
                  "PRO_GLDefault": {
                          "$ref": "1"
                      },
                  "LastModified": null
              }
          ]
  }</p>
  
  <p>Please advise me how to overcome this</p>
  
  <p>Thanks,
  Raj</p>