0

I have a script which uses a variable which contains a value in the form of '11/12/2014 07:58:08.157'. The script contains a curl command with this variable forming part of the http body (JSON request). The issue is the server is throwing a JSON parser error when this value is passed in the body. Replacing this value with '11/12/2014' seems to work fine, so it seems the time part of this string is causing issues. Using an echo command I have seen the curl command have this value enclosed in double quotes. (I have even tried single quotes.) Either way, I am still getting a JSON parser error. Removing the time component leads to another functional error, so I am hard pressed to pass both the date and time value to the server in the JSON body.

b4hand
  • 9,550
  • 4
  • 44
  • 49
jeet
  • 629
  • 1
  • 4
  • 15

0 Answers0