title: marshalling java object to JSON adds empty property using JAX-RS
body: <p>I'm using jax-rs and adding entity for being marshalled  in Jetty by JAXRSOutInterceptor,
  but JSON output is being modified with additional empty property which looks like this:
   "$": ""</p>
  
  <p>The JSONProvider is created and configured as here:</p>
  
  <pre><code>JSONProvider jsonProvider = new JSONProvider();
  jsonProvider.setConvertTypesToStrings(true);
  jsonProvider.setIgnoreNamespaces(true);
  jsonProvider.setIgnoreMixedContent(true);
  jsonProvider.setUnmarshallAsJaxbElement(true);
  providers.add(jsonProvider);
  </code></pre>
  
  <p>It is also being marshalled to XML which uses namespaces but I don't want them in JSON output and input.</p>
  
  <p>The object that is being marshalled is similar to this:</p>
  
  <pre><code>@XmlRootElement(name="myObject1")
  @XmlAccessorType(XmlAccessType.FIELD)
  @SuppressWarnings("serial")
  public class MyObject1 implements Serializable {
  
      MyObject2 a;
      MyObject2 b;
      MyObject2 c;
  
  // includes getters, setters, hashCode, equals, toString,   
  }
  </code></pre>
  
  <p>When MyObject2 is:</p>
  
  <pre><code>@XmlRootElement
  @XmlAccessorType(XmlAccessType.FIELD)
  @SuppressWarnings("serial")
  public class MyObject2 implements Serializable {
  
      String x;
      String y;
      List&lt;String&gt; z;
  
  // includes getters, setters, hashCode, equals, toString,   
  }
  </code></pre>
  
  <p>The rest output is as following:</p>
  
  <pre><code>{
     "myObject1": {
        "a": {
           "x": "value1",
           "y": "value2",
           "z": "value3",
           "$": ""
        },
        "$": ""
     }
  }
  </code></pre>
  
  <p>How do I get rid of the ending "$": ""
  I read that the Jettison (which is the default JSONProvider implementation that I am using) is by default will represent properties mapped with @XmlValue as '$'s but there's no property ?</p>
  
  <p>Is that caused by implementing Serializable?</p>