Re: [json-lib-user] XML -> JSON, "type" attribute omitted?
Brought to you by:
aalmiray
From: Andres A. <aal...@ya...> - 2007-10-15 04:08:42
|
Hi John,=0A=0ASorry for the late reply. The answer is yes and no, let me ex= plain. XMLSerializer has an option to expose a value's type when serializin= g JSON to XML, that information is written as an attribute named 'type'. Wh= en reading it is assumed you want to recover that information if 'type' is = an attribute of a node, but it seems that in your case type has a business = meaning and should be treated like that instead of a construct of the libra= ry. The same will happen with an attributed named 'class' by the way.=0A = =0ALet me look for an alternative that is backward compatible at the same t= ime.=0A=0ACheers,=0AAndres=0A=0A=0A----------------------------------------= ---=0Ahttp://jroller.com/page/aalmiray=0Ahttp://www.linkedin.com/in/aalmira= y=0A--=0AWhat goes up, must come down. Ask any system administrator.=0ATher= e are 10 types of people in the world: Those who understand binary, and tho= se who don't.=0ATo understand recursion, we must first understand recur= sion.=0A=0A----- Original Message ----=0AFrom: John Cartwright <John.C.Cart= wr...@no...>=0ATo: jso...@li...=0ASent: Monday, = October 8, 2007 10:29:37 AM=0ASubject: [json-lib-user] XML -> JSON, "type" = attribute omitted?=0A=0AHello All,=0A=0AIt seems to me that when converting= XML to JSON, elements w/ an =0Aattribute named "type" have that attribute = omitted. Is this expected =0Abehavior?=0A=0AThanks!=0A=0A-- john=0A=0A=0A-= ------------------------------------------------------------------------=0A= This SF.net email is sponsored by: Splunk Inc.=0AStill grepping through log= files to find problems? Stop.=0ANow Search log events and configuration f= iles using AJAX and a browser.=0ADownload your FREE copy of Splunk now >> h= ttp://get.splunk.com/=0A_______________________________________________=0Aj= son-lib-user mailing list=0Aj...@li...=0Ahttps://l= ists.sourceforge.net/lists/listinfo/json-lib-user=0A=0A=0A=0A=0A=0A=0A=0A = =0A___________________________________________________________________= _________________=0ABoardwalk for $500? In 2007? Ha! Play Monopoly Here and= Now (it's updated for today's economy) at Yahoo! Games.=0Ahttp://get.games= .yahoo.com/proddesc?gamekey=3Dmonopolyherenow |