Thanks a bunch!

Looks like my JSON data is not correctly formatted or wrapped in the callback 
function.  Let me see if I can tweak it and see what happens.

David

> Date: Thu, 25 Jun 2009 16:24:54 -0700
> Subject: [jQuery] Re: Autocomplete - trouble with getJSON callback function 
> not  executing?
> From: jmay...@gmail.com
> To: jquery-en@googlegroups.com
> 
> 
> The link to your json file didn't work, so I couldn't look it over.
> But incorrectly formatted json will result in a failure in getJSON()
> call and your callback would never be executed. Your json has to be
> perfect, so look it over very carefully.
> 
> Here's a couple of common gotchas:
> 
> [
>       {
>               "date": "1-Jun",
>               "time": "2:00 PM",
>       },
>       {
>               "date": "3-Jun",
>               "time": "2:00 PM",
>       },
> ]
> 
> 1) Note that the "time" field on both records has a comma at the end.
> This is incorrect, the last field should have no comma at the end.
> 
> 2) Same thing on the last record, there is a comma following the
> ending curly bracket. No comma should come after the last record.
> 
> This file should fail if you try it, but will succeed when removing
> these commas. There are other formatting errors not quite as common.
> Basically, json files have to be perfect. A lot of people have json
> generators to ensure they will be correct.
> 
> hth!

_________________________________________________________________
Windows Liveā„¢: Keep your life in sync. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009

Reply via email to