title: CSV generator does not support Array values for properties
body: <p>I'm trying to develop an application that convert <strong>JSON</strong> to <strong>CSV</strong>.</p>
  
  <p>I'm using <strong>JACKSON</strong> to parse <strong>JSON</strong> and write <strong>CSV</strong>.</p>
  
  <p>Here is an <strong>example</strong> of a  <strong>JSON</strong> I'm trying to parse  : </p>
  
  <pre><code>{ "_id" : 0, 
   "name" : "aimee Zank", 
   "scores" : 
             [ 
               { "type" : "exam", "score" :   1.463179736705023 }, 
               { "type" : "quiz", "score" : 11.78273309957772 },  
               { "type" : "homework", "score" : 6.676176060654615 },  
               { "type" : "homework", "score" : 35.8740349954354 } 
              ] 
       }
  
    { "_id" : 1, 
      "name" : "Aurelia Menendez", 
      "scores" : 
                [ 
                  { "type" : "exam", "score" : 60.06045071030959 }, 
                  { "type" : "quiz", "score" : 52.79790691903873 }, 
                  { "type" : "homework", "score" : 71.76133439165544 }, 
                  { "type" : "homework", "score" : 34.85718117893772 } 
               ] 
         }
  
   { "_id" : 2, 
    "name" : "Corliss Zuk", 
     "scores" : 
               [ 
                { "type" : "exam", "score" : 67.03077096065002 }, 
                { "type" : "quiz", "score" : 6.301851677835235 }, 
                { "type" : "homework", "score" : 20.18160621941858 }, 
                { "type" : "homework", "score" : 66.28344683278382 } 
               ] 
           }
  </code></pre>
  
  <p>The two Java Classes :</p>
  
  <p>JsonNode class  </p>
  
  <pre><code>public class JsonNode {
  
  private String _id;
  private String name;
  private Collection&lt;ScoreType&gt; scores;
  
  /**
   * @return the _id
   */
  public String get_id() {
      return _id;
  }
  /**
   * @param _id the _id to set
   */
  public void set_id(String _id) {
      this._id = _id;
  }
  /**
   * @return the name
   */
  public String getName() {
      return name;
  }
  /**
   * @param name the name to set
   */
  public void setName(String name) {
      this.name = name;
  }
  /**
    * @return the scores
   */
  public Collection&lt;ScoreType&gt; getScores() {
      return scores;
  }
  /**
    * @param scores the scores to set
   */
  public void setScores(Collection&lt;ScoreType&gt; scores) {
      this.scores = scores;
   }
   }
  </code></pre>
  
  <p>ScoreType class </p>
  
  <pre><code>public class ScoreType {
  private String type;
  private String score;
  /**
   * @return the type
   */
  public String getType() {
      return type;
  }
  /**
   * @param type the type to set
   */
  public void setType(String type) {
      this.type = type;
  }
  /**
   * @return the score
   */
  public String getScore() {
      return score;
  }
  /**
   * @param score the score to set
   */
  public void setScore(String score) {
      this.score = score;
  }
  
  }
  </code></pre>
  
  <p>The method that  convert <strong>JSON</strong> to <strong>CSV</strong></p>
  
  <pre><code>  ObjectMapper mapper=new ObjectMapper();
  
      JsonNode jsonNode=mapper.readValue(new File("C:\\...\\...\\...\\test.json"), JsonNode.class);
  
      CsvMapper csvMapper=new CsvMapper();
      CsvSchema schema=csvMapper.schemaFor(JsonNode.class);
  
      schema=schema.withColumnSeparator(';');
  
      ObjectWriter myObjectWriter=csvMapper.writer(schema);
  
      FileOutputStream tempFileOutputStream=new FileOutputStream(out+"\\jsontocsv.csv");
      BufferedOutputStream bufferedOutputStream=new BufferedOutputStream(tempFileOutputStream);
      OutputStreamWriter writerOutputStream=new OutputStreamWriter(bufferedOutputStream,"UTF-8");
  
      myObjectWriter.writeValue(writerOutputStream,jsonNode);
  </code></pre>
  
  <p>The console output :</p>
  
  <pre><code>com.fasterxml.jackson.core.JsonGenerationException: CSV generator does not support 
  </code></pre>
  
  <p>Array values for properties</p>
  
  <p>The CSV output :</p>
  
  <pre><code>"0";"aimee Zank";
  </code></pre>
  
  <p>That's what I have done so far.</p>
  
  <p>So I'm facing two issues here :</p>
  
  <p>1) The output CSV is not complete, it creates only one line and don't write scores.</p>
  
  <p>2) The error in the console.</p>
  
  <p>I'm using these <strong>JACKSON</strong> depandencies :</p>
  
  <pre><code>  &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.dataformat&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-dataformat-csv&lt;/artifactId&gt;
          &lt;version&gt;2.4.0&lt;/version&gt;
      &lt;/dependency&gt; 
  </code></pre>
  
  <p>Can anyone help me solving these issues ?</p>
  
  <p>I hope I was clear enough.</p>
  
  <p><strong>Edits</strong> CSV I'm expecting :</p>
  
  <pre><code>_id;name;scores.type;scores.score;scores.type;scores.score;scores.type;scores.score
  0;aimee Zank;exam;1.46;quiz;11.78;homework;6.67;homework;35.87
  </code></pre>
  
  <p>Ismail</p>