<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
On 11/05/2012 11:09, Brad Cox wrote:
<blockquote
cite="mid:CAH2etF5QruwGMNfdk-y58UJs_0qf+diaZ-o_GSiLYxqRoqtxtQ@mail.gmail.com"
type="cite">Perhaps?
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><array><br>
<value>23</value><br>
<value/><br>
<value><color>red</color></value> </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><array/><br>
</array></blockquote>
</blockquote>
That's an option. But you appear to be representing "null" in the
same way as an empty map; and you have chosen to map the JSON key
"color" to the element name "color", which raises the question how
you will map JSON keys that are not legal element names.<br>
<br>
My point is that these problems can be solved in many different
ways, which is why there are many different mappings of JSON to XML.
I don't think there is any reason why JSON should work with only one
of these mappings; the conversion of JSON to XML and the
representation of XML in Java are two completely orthogonal
decisions that do not need to be bundled together.<br>
<br>
Michael Kay<br>
Saxonica<br>
<br>
<blockquote
cite="mid:CAH2etF5QruwGMNfdk-y58UJs_0qf+diaZ-o_GSiLYxqRoqtxtQ@mail.gmail.com"
type="cite">
<div><br>
<div class="gmail_quote">On Fri, May 11, 2012 at 3:25 AM,
Michael Kay <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:mike@saxonica.com" target="_blank">mike@saxonica.com</a>></span>
wrote:<br>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div class="im">OK, so what will the JDOM model look like
if this is the JSON input:</div>
<br>
[ 23, null, {color:red}, [] ]<span class="HOEnZb"><font
color="#888888"><br>
<br>
Michael Kay<br>
Saxonica<br>
<br>
</font></span></div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</body>
</html>