Sending JSON to the server adds a layer of complexity to both sides.
If it has no benefits (I don't see any), then yes, you're better off
keeping it simple and using a query string and $_POST instead. jQuery
handles object to query string conversion automatically:

$.post('cheese.php', { cat: 1, mouse: 3 }, callback);
http://docs.jquery.com/Ajax/jQuery.post

On Jun 23, 1:24 pm, Nic Hubbard <nnhubb...@gmail.com> wrote:
> Well, right now I am sending JSON to my php script which then uses
> json_decode() to make them into vars.  But, I am wondering, is sending
> JSON the best way?  Or should I just send the data as a normal query
> string, rather than JSON?  Which is best?
>
> On Jun 22, 5:13 pm, cs <chuck.schleut...@gmail.com> wrote:
>
> > Why not make each field that has a nested key-value pair an object
> > instead? In short, any array with a key but without a value is an
> > object since your value is just an array of elements. What language is
> > in charge of your back-end? And how is it handling the inputs your
> > pass it? This is what really counts.
>
> > JSON is
>
> > On Jun 22, 7:01 pm, Nic Hubbard <nnhubb...@gmail.com> wrote:
>
> > > Yeah, I am not too hot on using a plugin for this.  I had hoped there
> > > was just a quick function that I could pass in an array and return
> > > JSON.
>
> > > On Jun 22, 8:28 am, diogobaeder <diogobae...@gmail.com> wrote:
>
> > > > Hmmm... why would one use this plugin if we have Douglas Crockford's
> > > > json2.org, which is the original JSON library from the same creator of
> > > > the concept "JSON"? And why load more modules into the main jQuery
> > > > object, making it heavier, if we don't use DOM element wrappers in the
> > > > plugin, only conversions to/from JS objects?
>
> > > > Sorry, I don't mean to be harsh, but it seems to me that this plugin
> > > > is a reinvented wheel, and also that it didn't have to be a "jQuery
> > > > plugin" to work. Does it have anything that we can't see in json2.org?
>
> > > > Diogo
>
> > > > On Jun 21, 11:39 pm, kranthi <kranthi...@gmail.com> wrote:
>
> > > > > are u looking forhttp://www.google.co.in/search?q=jquery+json+plugin?

Reply via email to