[Dojo-interest] Sending JSON Data to a server

Jochen Luig jochen.luig at skytel.de
Thu Aug 7 12:27:50 UTC 2008


Hi, 

Am Donnerstag, den 07.08.2008, 12:11 +0000 schrieb Anthony Fryer:
> I send json to the server using xhrPost by assigning the json a
> parameter. 
>  
> ie. 
>  
> dojo.xhrPost({
>   url: './blah',
>   content: { json: dojo.toJson(myJsonObject) }
> });
>  
> On the server i just get the "json" parameter value and deserialize
> it.

Yes, I read about that approach in the forums. The problem with this is
that my server will just take the HTTP-Request's body and try to
serialize it. Thus, your way will leave me having to deserialize the
data myself (as long as I don't want to introduce some ugly hack into my
App).

Bye,

Jochen



More information about the Dojo-interest mailing list