i have to create a json file that contain some object (a name, a string list and a date list). the problem is when i have to write and read date in LocalDate format.
if i write and then i print the jsonObject, the format of the date is ok. but when i do the parse and suddedly i print the object, the format of the date is wrong.

this is the code for write in the file:

```
public void aggiungi(){
    JSONObject obj = new JSONObject();
    obj.put("name", this.name);
    JSONArray listMov = new JSONArray();
    JSONArray listData = new JSONArray();
    for(int i =0; i<this.movimenti.size(); i++){
        listMov.add(movimenti.get(i));
        listData.add(data.get(i));
    }
    obj.put("data", listData);
    obj.put("mov", listMov);

    File file=new File("file.json");
    try {
        file.createNewFile();
        FileWriter fileWriter = new FileWriter(file);
        fileWriter.write(obj.toJSONString());
        fileWriter.flush();
        fileWriter.close();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    System.out.println(obj);

}

```

**and the final println print:**

```
{"data":[2015-03-02,2015-04-05,2015-06-10],"mov": 
["F24","PagoBancomat","Bollettino"],"name":"Stefano"}

```

and this is the code for read:

```
 JSONParser parser = new JSONParser();//per decodifica
        Object obj;
        try {
            obj = parser.parse(new FileReader("file.json"));

            JSONObject jsonObj = (JSONObject) obj;
            String name= (String) jsonObj.get("name");
            JSONArray list = (JSONArray) jsonObj.get("mov");
            JSONArray listData = (JSONArray) jsonObj.get("data");
            System.out.println(jsonObj);
            Iterator<String> iteratorM = list.iterator();
            Iterator<LocalDate> iteratorD = listData.iterator();
            ArrayList<String> mov =new ArrayList<String>(list.size());
            ArrayList<LocalDate> data =new ArrayList<LocalDate>(list.size());
            while(iteratorM.hasNext()){
                mov.add(iteratorM.next());

            }
            while(iteratorD.hasNext()){
                data.add(iteratorD.next());

            }
            ContoCorrente cc = new ContoCorrente(data, mov, name);
            Contatore task = new Contatore(cc);
            this.executeTask(task);
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

```

**and print** 

```
{"data":[2015,-3,-2,2015,-4,-5,2015,-6,-10],"mov": 
["F24","PagoBancomat","Bollettino"],"name":"Stefano"}

```

the last print separes the structure of a date, separing day, month and year.

what i do wrong in the code?
thanks you and sorry for my bad english