I got this problem when I attempt to retrieve the event list of the public 
calendar:

{"apiVersion":"1.0","error":{"code":400,"message":"Invalid 
JSON","errors":[{"domain":"GData","code":"invalidJson","internalReason":"Invalid
 
JSON"}]}}1

I use cURL to POST the HTTP request.

Here is my script:

<?php
$data  = 
array('alt'=>'json-in-script','callback'=>'insertAgenda','orderby'=>'starttime','max-results'=>'15','singleevents'=>'true','sortorder'=>'ascending','futureevents'=>'true');
$json = json_encode($data);
$header = array('Content-type: application/json');
$url = 
"http://www.google.com/calendar/feeds/[email protected]/public/full";;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POSTFIELDS,$json);
curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
$result = curl_exec($ch);
curl_close($ch);
print_r(json_decode($result));
?>

Is there any mistake with the JSON? or the problem is caused by other 
mistakes?

thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/calendar/community/forum.html

Reply via email to