> in such case, you will not end up with an array, i.e.
>
> <person><foo>bar</foo></person><person><foo>baz<</foo></person>
>
> gets translated into (omitting quotes):
>
> {person:[{foo:bar},{foo:baz}]}
>
> while
>
> <person><foo>bar</foo></person><animal><bee>cee</bee></animal>
>
> gets translated into:
>
> {person:{foo:bar},animal:{bee:cee}}
Well, what I'm seeing is that if I had an array of people, the people do
not have a "person" element. That's what I'm saying. So you'd have:
{"people": [{foo:bar}, {foo:baz}]}
There is no "person" designation in the people array/list. That's fine
when you have a generic list/array but if you have mixed list/array, you
could run into a problem:
{"objects": [{foo:bar}, {bee:cee}]}
I guess since I've not actually created code for the last scenario, I
might be worrying about a scenario that might not manifest the way I've
described. I'll work on creating an example of both, testing and if
required, post to the list.
> Agreed, it is not apparent how xml and json relate in this case.
> On the other hand, json expression is much more simpler this way,
> while containing all the info needed, and this (simplicity)
> is what we wanted to provide.
> I will make sure an option is available for you to confgure
> json to get the format you requesting.
Well, to me both support hierarchical data structures and I would expect
them to map the same. As it appears now, they really do map the same
but with JSON being a little less verbose when it comes to lists, there
might be a problem with having a list of mixed object types if there is
no way to look at a JSON array and tell what the object types are in the
array. Like I mentioned above, let me try to create a working code
example and I'll post back with my results. :)