why not use xml?
On Saturday, January 5, 2013 9:03:01 AM UTC-8, Roman Bugaian wrote:
It's simly to send POST reaquest with Lists consisting of
BasicNameValuePair, but how to send a pair, where a value is another list
of pairs?
--
You received this message because you are subscribed to the
You can:
- invent a format that can be processed by your server.
- use XML as suggested by JackN. But here as well you need to define a
format
- use JSON because it is more compact than XML and supports arrays and
multidimensional arrays
On Saturday, January 5, 2013 11:03:01
I would also recommend JSON. As Nobu said it is compact and many server
side programming languages have libraries readily available for it.
Otherwise as far as I know mimicking a form post doesn't offer an input
type that natively supports an embedded name value pair.
Here's an example on
Sorry hit enter too quick. Example below. This creates a value of error
containing two addtional name value pairs.
JSONObject msgJSON = new JSONObject();
msgJSON.put(error, new JSONObject());
msgJSON.getJSONObject(error).put(code, errorCode);
JSON is the only way to go.. most compact, supports object trees easily,
jackson is fast stream parser and can map to objects from json string and
vice versa.. look it up, use it. You won't go back.
On Tue, Jan 8, 2013 at 11:56 AM, George Baker spaceastrono...@gmail.comwrote:
Sorry hit enter
In regards to George's reply.. that works.. but depending on the library
you use (looking at you org.json.*) it could eat up a bit of memory...
obviously something to avoid on phones/tablets if possible. Jackson has an
additional library for support a JSONObject, but with the mapping features,
you
6 matches
Mail list logo