To OP: other than JSON, there are two possibilities,
1.) You can look at Rhino Engine (Could be helpful to script java, but i doubt if this is 'exactly' what you are looking for),
2.) Use JAXB on server end and parse the XML to create an object literal out here?
On JSON,
JSON vs XML debate
this quote to me works the best:
Isn’t the “JSON vs XML” debate a bit like a “PNG vs JPG” debate, in which developers of image-display applications decide their apps will handle one or the other?
In a services-oriented world, once you’re past same-site restrictions (via signed scripts or trusted zones), you will have occasion to consume services providing SOAP, POX and JSON data, based on the service-providers preference regardless of your’s. Sure, if you control the service side, JSON can be much more efficient; but existing Web services won’t add this to their APIs just to make your life easier.
IMHO, the smart path is implementing a framework that can handle various data formats, via various retrieval methods (SOAP, REST, HTTP-POST, etc.) — possibly marshalling everything to JSON for faster processing.
I like JSON, but there are organizations that already have a lot of things going on for them with XML, you can't just argue with those people because its either:
1.) Elegant
2.) More "bandwidth-friendly" <-- I don't even know if this is true, I'd like to see performance benchmarks on JSON vs XML with same datasets.
3.) Makes life easier.
I know that there a lot people who have had issues with parsing and processing XML being pain in the butt, but there are frameworks out there that make your life easier if thats a concern;
Trilochan.