[jdom-interest] Wish-list

Michael Kay mike at saxonica.com
Fri May 11 03:56:48 PDT 2012

On 11/05/2012 11:09, Brad Cox wrote:
> Perhaps?
>     <array>
>     <value>23</value>
>     <value/>
>     <value><color>red</color></value> 
>     <array/>
>     </array>
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.

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.

Michael Kay

> On Fri, May 11, 2012 at 3:25 AM, Michael Kay <mike at saxonica.com 
> <mailto:mike at saxonica.com>> wrote:
>     OK, so what will the JDOM model look like if this is the JSON input:
>     [ 23, null, {color:red}, [] ]
>     Michael Kay
>     Saxonica
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.jdom.org/pipermail/jdom-interest/attachments/20120511/4cd06af7/attachment.html>

More information about the jdom-interest mailing list