title: Why have Rest-Easy and Jersey different JSON Output Formats?
body: <p>I have written a rest service API which returns a data structure in a kind of a map layout. The map entries can be from type String, Integer or Date. The rest service method supports XML and Json output.  </p>
  
  <p>Now I recognized that the JSON outcome in GlassFish (Jersey) is different as in Wildfly (Reas-Easy)</p>
  
  <p>When running the rest servie on GlassFish with application/json the output looks like this:</p>
  
  <pre><code>{"entity":{"item":{"name":"$modified","value":{"@type":"xs:dateTime","$":"2015-02-17T22:33:57.634+01:00"}}}}
  </code></pre>
  
  <p>And the same result on WildFly (Rest-Easy) looks like this:</p>
  
  <pre><code>{"entity":[{"item":[{"name":"$modified","value":[1425822673120]}]}]}
  </code></pre>
  
  <p>Can anybody explain this behavior? I would expect that the output in WildFly should be simmilar to GlassFish? </p>
  
  <p>The interesting thing is that When I call the same method with the request header 'application/xml' both systems return the same (expected) format.</p>
  
  <p>GlassFish XML: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;collection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;entity&gt;&lt;item&gt;&lt;name&gt;$modified&lt;/name&gt;
  &lt;value xsi:type="xs:dateTime"&gt;2015-02-17T22:33:57.634+01:00&lt;/value&gt;&lt;/item&gt;&lt;/entity&gt;&lt;/collection&gt;
  </code></pre>
  
  <p>Wildfly XML: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;collection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;entity&gt;&lt;item&gt;&lt;name&gt;$modified&lt;/name&gt;
  &lt;value xsi:type="xs:dateTime"&gt;2015-03-08T14:51:13.120+01:00&lt;/value&gt;&lt;/item&gt;&lt;/entity&gt;&lt;/collection&gt;
  </code></pre>
  
  <p>Is there a way to configure the JSON Format for Rest-Easy?</p>