<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Real JSON vs. XMLish JSON</title>
	<atom:link href="http://codemonkeyism.com/real-json-xmlish-json/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkeyism.com/real-json-xmlish-json/</link>
	<description></description>
	<lastBuildDate>Mon, 15 Mar 2010 13:03:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Justin Cormack</title>
		<link>http://codemonkeyism.com/real-json-xmlish-json/comment-page-1/#comment-248565</link>
		<dc:creator>Justin Cormack</dc:creator>
		<pubDate>Mon, 19 Oct 2009 12:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1264#comment-248565</guid>
		<description>People are hung about about interchangeability. JSON and XML and not equivalently expressive (or we would all use JSON!)</description>
		<content:encoded><![CDATA[<p>People are hung about about interchangeability. JSON and XML and not equivalently expressive (or we would all use JSON!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cowtown Coder</title>
		<link>http://codemonkeyism.com/real-json-xmlish-json/comment-page-1/#comment-247988</link>
		<dc:creator>Cowtown Coder</dc:creator>
		<pubDate>Thu, 15 Oct 2009 05:28:18 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1264#comment-247988</guid>
		<description>Stephan, I agree in that trying to directly convert JSON to XML or vice versa is a losing battle. In fact, so much so that this is a clear data format anti-pattern.

Instead I think it makes sense to bind XML and JSON separately to/from plain old objects; so conversion between formats is a two-step process. But both can use &quot;natural&quot; representation. For Java this can be done by using JAXB for XML, and Jackson for JSON; and I assume similar pair exist for other platforms.

In most common cases, however, conversions are not even needed: input comes as xml or json, gets bound to objects; request is processed, response object(s) constructed, and converted to xml or json (not necessarily same format as input was in). Or similarly with other formats (protobuf, thrift, yaml, what have you). That seems like the obvious sensible approach -- not trying to shoehorn all input/output through a single transfer data format.</description>
		<content:encoded><![CDATA[<p>Stephan, I agree in that trying to directly convert JSON to XML or vice versa is a losing battle. In fact, so much so that this is a clear data format anti-pattern.</p>
<p>Instead I think it makes sense to bind XML and JSON separately to/from plain old objects; so conversion between formats is a two-step process. But both can use &#8220;natural&#8221; representation. For Java this can be done by using JAXB for XML, and Jackson for JSON; and I assume similar pair exist for other platforms.</p>
<p>In most common cases, however, conversions are not even needed: input comes as xml or json, gets bound to objects; request is processed, response object(s) constructed, and converted to xml or json (not necessarily same format as input was in). Or similarly with other formats (protobuf, thrift, yaml, what have you). That seems like the obvious sensible approach &#8212; not trying to shoehorn all input/output through a single transfer data format.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/real-json-xmlish-json/comment-page-1/#comment-246518</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Thu, 01 Oct 2009 14:11:31 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1264#comment-246518</guid>
		<description>@Al: Nice approach, I&#039;ll take a look</description>
		<content:encoded><![CDATA[<p>@Al: Nice approach, I&#8217;ll take a look</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://codemonkeyism.com/real-json-xmlish-json/comment-page-1/#comment-246508</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Thu, 01 Oct 2009 12:08:10 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1264#comment-246508</guid>
		<description>I&#039;m using namespace to qualify datatype and keep &quot;small&quot; XML structure.
See it here http://code.google.com/p/ndjin/wiki/WebServiceProtocol

For example:


 
  John
  23
  &lt;b&gt;false&lt;/b&gt;
 
</description>
		<content:encoded><![CDATA[<p>I&#8217;m using namespace to qualify datatype and keep &#8220;small&#8221; XML structure.<br />
See it here <a href="http://code.google.com/p/ndjin/wiki/WebServiceProtocol" rel="nofollow">http://code.google.com/p/ndjin/wiki/WebServiceProtocol</a></p>
<p>For example:</p>
<p>  John<br />
  23<br />
  <b>false</b></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Brown</title>
		<link>http://codemonkeyism.com/real-json-xmlish-json/comment-page-1/#comment-246094</link>
		<dc:creator>Paul Brown</dc:creator>
		<pubDate>Tue, 29 Sep 2009 17:20:24 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1264#comment-246094</guid>
		<description>See what you think of the JAXB support that is baked into Jackson — http://docs.codehaus.org/display/JACKSON/Jackson+JAXB+Support — among other things, this gets you data format polymorphism over a single Java object model.  That said, you&#039;ll get prettier JSON (wihtout things like @nil silliness) from a bean mapping instead, and this also overlays cleanly with a JAXB-annotated model, just not with the same annotations.</description>
		<content:encoded><![CDATA[<p>See what you think of the JAXB support that is baked into Jackson — <a href="http://docs.codehaus.org/display/JACKSON/Jackson+JAXB+Support" rel="nofollow">http://docs.codehaus.org/display/JACKSON/Jackson+JAXB+Support</a> — among other things, this gets you data format polymorphism over a single Java object model.  That said, you&#8217;ll get prettier JSON (wihtout things like @nil silliness) from a bean mapping instead, and this also overlays cleanly with a JAXB-annotated model, just not with the same annotations.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
