Re: Issue 20 in android-xmlrpc: Problem parsing array of structs

19 views
Skip to first unread message

android...@googlecode.com

unread,
Nov 23, 2010, 4:43:55 PM11/23/10
to android-x...@googlegroups.com

Comment #4 on issue 20 by j...@sprig.gs: Problem parsing array of structs
http://code.google.com/p/android-xmlrpc/issues/detail?id=20

I'm looking at this, and struggling somewhat to figure out how to add it
into the release. That said, I'm not great at Java, so I don't really know
what other types one might expect to receive over an XMLRPC link that one
can convert into the types within java... so, I don't know what to suggest.
Does anyone have any suggestions?

android...@googlecode.com

unread,
Dec 10, 2010, 3:23:09 AM12/10/10
to android-x...@googlegroups.com

Comment #5 on issue 20 by jonefoley: Problem parsing array of structs
http://code.google.com/p/android-xmlrpc/issues/detail?id=20

Its not clear to me why an array would cast directly to a HashMap. Structs
certainly would because these are unordered key,value pairings. Arrays are
ordered and don't have key-value pairs...wouldn't a more natural cast be a
Java vector?? So an array of structs would be
Vector<HashMap<String,Object>> or some such. There is only so much you can
do though because the nesting isn't really limited. So you could have an
array of structs which have mixed types as elements, so it will still be up
to the user to cast the appropriate type.

If you can handle some of these casts in the library internally it would
really improve the usability.

android...@googlecode.com

unread,
Jun 23, 2011, 8:34:01 AM6/23/11
to android-x...@googlegroups.com

Comment #6 on issue 20 by stermi: Problem parsing array of structs
http://code.google.com/p/android-xmlrpc/issues/detail?id=20

Thank you very much you saved my day! :)

Some other tricks?


android...@googlecode.com

unread,
Apr 15, 2012, 3:16:46 PM4/15/12
to android-x...@googlegroups.com

Comment #7 on issue 20 by mail.ga...@gmail.com: Problem parsing array of
structs
http://code.google.com/p/android-xmlrpc/issues/detail?id=20

The hashmap solution is working w/ me and it's enough so far.

android...@googlecode.com

unread,
Apr 4, 2013, 3:41:10 AM4/4/13
to android-x...@googlegroups.com

Comment #8 on issue 20 by hermawan...@gmail.com: Problem parsing array of
structs
http://code.google.com/p/android-xmlrpc/issues/detail?id=20

can array two dimension work on this?
exmp array like this:

Array
(
[0] => Array
(
[first_name] => John
[last_name] => Doe
[member_id] => 123435
)

[1] => Array
(
[first_name] => Robert
[last_name] => Brown
[member_id] => 123436
)

)

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages