Sign In/My Account | View Cart  
advertisement

Article:
 Converting Between XML and JSON
Subject: What happens to empty elements?
Date: 2006-10-09 12:24:03
From: babbage

Hi, great article.


I tried out this converter with the document here:


http://www.lisa.org/standards/tmx/tmx.html#AppSample


It converted to JSON fine, but when I converted that back to XML, I ran into a problem: in the source document, the "header" element is empty, but it contains a closing tag (it's defined as containing optional other elements).


The json2xml function removes the closing tag, so it's not round-trip. Any thoughts on this?


Previous Message Previous Message   Next Message Next Message


Sponsored By: