views:

84

answers:

1

I need to transfer a significant amount of structured data that goes something like this in XML -

<person>
    <fname></fname>
    <lname></lname>
    <DOB></DOB>
    .
    .
</person> 

Each person record has 5 fields, and each time the app is opened, about 30-40 (possibly more) person records will be loaded.

Will XML be a good implementation to do this? Should I be worried about Data rates over 3G / Processor speed / Code and memory size?

Should I be looking at JSON? If so, can I make an ASP.NET web service return JSON data?

+1  A: 

In my experience it has been very easy doing JSON parsing (and generation) in BlackBerry using the http://www.json.org/java/org.json.me.zip code, which works great and has a very small footprint. If you do want to go the XML route, check out http://kxml.sourceforge.net/ as I've seen it mentioned here on Stack Overflow before in regards to BlackBerry XML parsing.

Marc Novakowski
I'm worried about the data size though. I've tested the Web service and it returns an XML that's ~20kb.I'm wondering if it'll induce too much latency in Downloading / parsing/ displaying?
Tejaswi Yerukalapudi
20kb transfers pretty quickly over a 3G connection, and the JSON library itself is pretty efficient with memory and CPU (in my experience). However if the total latency for download, parsing, and displaying is more than a second or two it would probably be a good idea to show some sort of "spinner" UI to show the user that something is going on...
Marc Novakowski