>- see footer for list info -<
JQuery handles JSON nicely and agree to avoid WDDX, it's too bloaty for ajax
purposes. I'm not impressed with CF8's serializeJSON function. I need JSON
to look like this when transfering structs (which jquery can easily
understand):

{mydata:[{"key1","value1"},{"key2","value2"}, etc... ]}

But serializeJSON creates a list of column names (keys) first, and then a
list of values and no way of controlling how I or JQuery expects the data to
be formatted or what my "structure" is called. So instead I just cfoutput my
data to the page and format it the way I want it.

e.g.

{users:[<cfoutput query="result">
{"record_ID" : "#id#",
"email" : "#email#",
"signup_date" : "#DateFormat(signup_date,"d mmm yyyy")#"}
<cfif currentrow LT recordcount>,</cfif>
</cfoutput>
]}

Admitedly it's a bit hard coded, but it's very simple and I like simplicity.
Then I use $.getJSON() in jquery and Bob's your uncle.

Gary.


On Tue, Jun 10, 2008 at 1:04 PM, Snake <[EMAIL PROTECTED]> wrote:

> >- see footer for list info -<
> Surely it would just be simpler to work with json period if that's what you
> want and cut wddx out of the equation ?
>
> Russ
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] On Behalf Of Peter Boughton
>  Sent: 10 June 2008 12:32
> To: Coldfusion Development
> Subject: Re: [CF-Dev] WDDX<->JSON plugin for jQuery ?
>
> >- see footer for list info -<
> > You probably want cfjson :
> > http://www.epiphantastic.com/cfjson/
>
> That's more of a server-side [de]serialization tool?
> I experimented with it, but it appeared to require creating the JSON
> as a string on the JavaScript side, and then would need to strip the
> tags from the result and evaluate the string to JSON again, which all
> seemed a very messy way of doing things.
>
> I'm hoping there is something on the client-side, so that no/minimum
> changes are required at the CF side, and jQuery/plugin handles the
> conversion on the browser side?
>
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> >- Lists hosted by www.Gradwell.com <http://www.gradwell.com/> -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
>
>
>
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> >- Lists hosted by www.Gradwell.com <http://www.gradwell.com/> -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
>
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to