title: xStream JSON - how to handle null values
body: <p>I've this json example:</p>
  
  <pre><code>{
      "rows": [
          {
              "anaid": "1",
              "anaint": "123",
              "anastring": "-"
          },
          {
              "anaid": "2",
              "anaint": "-",
              "anastring": "Hello World"
          },
          {
              "anaid": "3",
              "anaint": "-",
              "anastring": "-"
          }
      ]
  }
  </code></pre>
  
  <p>where in my class Test are:</p>
  
  <ul>
  <li>int anaid</li>
  <li>int anaint</li>
  <li>String anastring</li>
  </ul>
  
  <p>My java code:</p>
  
  <pre><code>XStream xstream = new XStream(new JettisonMappedXmlDriver());
  xstream.alias("rows", Test.class);
  ArrayList&lt;Test&gt; product = (ArrayList&lt;Test&gt;) xstream.fromXML(json);
  </code></pre>
  
  <p>So the character "-" is the null value for my json. I can't change the code to create json, but I would handling the "-" null value to use correctly my xStream parser. </p>