Question: I'm seeking advice on best practice when submitting a varying number of POST variables.

Do I use JSON or some character separated list to merge all the values into one field or use a sequence of fields like 'autocomplete1', 'autocomplete2' and so on.

Does jQuery have a json encoder?

Thanks in advance,
Ben

Answer: 
To submit various post variables to the server the best way would be to post them as independent parameters. A request like this should do the trick:

```
http://server/automcompleter?autocomplete1=value1&autocomplete2=value2&...

```

In fact if you can create a multi-value parameter like this:

```
http://server/automcompleter?autocomplete=value1&autocomplete=value2&...

```

Where the parameters `autocomplete` would eventually be an array. If you are using php the parameter needs to be caller `autocomplete[]`.

As for the return use json.

You can use the [jQuery UI 1.8 plugin](http://docs.jquery.com/UI/Autocomplete) to do autocomplete.
To answer the last part of your question, yes, there is a json plugin for jQuery which I have used successfully, the project page is at <http://code.google.com/p/jquery-json/>