我有一些如下所示的发布数据,我试图将其发送到 cURL 函数,该函数又将数据发送到 POST 表单。
但是当我运行脚本时,我得到一个语法错误。我相信它是由"
. 通常,您可以使用 a 转义它们\"
或将它们更改为'
,但我认为这会在提交到表单时导致错误。我该如何处理?
{"potential":[{"Id":"B-1_10732423478-6551232102-0-LM-0","marketId":"1.1012336578","selection":6350122,"size":2,"price":2.5,"asian":0,"categoryType":"E","version":2,"Limit":0,"marketName":"Drive 2013","marketType":"UNDIFFERENTIATED","eventId":"269256462","orderType":"LIMIT","fractional":{"numerator":null,"denominator":null},"runnerId":"1_105868-6552342-0","transactionId":null,"each":false,"runnerOrder":1,"side":"BACK","inplay":false}],"deDupToken":"1368190973413"}
我得到的错误是:
Parse error: syntax error, unexpected 'potential' (T_STRING) in /Applications/MAMP/htdocs/curl/index.php on line 16