2007/10/10, Rowan Kerr <[EMAIL PROTECTED]>: > > On 10-Oct-07, at 3:07 PM, Alberto Ruiz wrote: > > You could always url-encode instead of doing custom separators (%2F > > insead of $). > > > > Yeah, well, $ is just one char I think it makes it clearer. > > $ is "magic", url encoding is standard in HTTP world and supported > out of the box by client and server sides (javascript's > encodeURIComponent) and there should be some C libraries that can > handle it too. Why worry about what the actual messages look like > when they're sent over the wire? > > > > Because that would mean that we should embed a JSON parser on > > the server side code. And I would like to avoid that if there are > > other options to keep the code as clean and simple as possible. > > Maybe go with XML instead of JSON, then? > What is the client side using? (You mentioned AJAX in your blog > post .. is it actually using XML?)
We´re sending JSON from the server to the client to avoid xml generation and parsing. Wich I find more complex. The server side is written in python, so sending the values is just a matter of encoding them into json, which is pretty simple. Decoding JSON from python would require a JSON parser, and I would like to avoid that as long as we can. Or could just split the post data into key=...&value=... so the > server could read the individual values. > > fwiw, I did come across a small open-source JSON C library. > <http://oss.metaparadigm.com/json-c/> > > > _______________________________________________ > Cherokee mailing list > [email protected] > http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee > -- Un saludo, Alberto Ruiz
_______________________________________________ Cherokee mailing list [email protected] http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee
