title: Android Jsonwriter writes 0 instead of my value into the file
body: <p>I have a Jsonwriter which is writing into a file. I want to save all of my Book objects which have id, title, author, releasedate, type, description and link. I still get 0 at the releaseDate name, but in the array there is the right value.</p>
  
  <pre><code>JsonWriter writer = new JsonWriter(new OutputStreamWriter
                  (this.openFileOutput("books.json",Context.MODE_PRIVATE),"ISO-8859-2"));
          writer.beginArray();
          for(Book b : MainActivity.books){
              writer.beginObject();
              writer.name("id").value(b.getId());
              writer.name("title").value(b.getTitle());
              writer.name("author").value(b.getAuthor());
              writer.name("releaseDate").value(b.getReleaseDate());
              writer.name("type").value(b.getType());
              writer.name("description").value(b.getDescription());
              writer.name("link").value(b.getLink());
              writer.endObject();
          }
          writer.endArray();
          writer.close();
  </code></pre>
  
  <p>public class Book implements Parcelable, Comparable{</p>
  
  <pre><code>public int id;
  public String title;
  public String author;
  public String type;
  public int releaseDate;
  public String description;
  public String link;
  public int isfav;
  
  public static final int OBTITLE = 1;
  public static final int OBAUTHOR = 2;
  public static final int OBRDATE = 3;
  
  public static int orderby = OBTITLE;
  
  public static int getOrderby() {
      return orderby;
  }
  
  public static void setOrderby(int orderby) {
      Book.orderby = orderby;
  }
  
  public Book(int id, String title, String author, String type, int releaseDate, String description, String link) {
      this.id = id;
      this.title = title;
      this.author = author;
      this.type = type;
      this.releaseDate = releaseDate;
      this.description = description;
      this.link = link;
      this.isfav = 0;
  }
  
  
  public Book(Parcel in) {
      this.id = Integer.parseInt(in.readString());
      this.title = in.readString();
      this.author = in.readString();
      this.type = in.readString();
      this.releaseDate = Integer.parseInt(in.readString());
      this.description = in.readString();
      this.link = in.readString();
  }
  
  
  public String getTitle() {
      return title;
  }
  
  public String getAuthor() {
      return author;
  }
  
  public int getId() {
      return id;
  }
  
  public int getIsfav() {
      return isfav;
  }
  
  public String getType() {
      return type;
  }
  
  public int getReleaseDate() {
      return releaseDate;
  }
  
  public String getDescription() {
      return description;
  }
  
  public String getLink() {
      return link;
  }
  
  @Override
  public int describeContents() {
      return 0;
  }
  
  @Override
  public void writeToParcel(Parcel dest, int flags) {
      dest.writeString(String.valueOf(id));
      dest.writeString(title);
      dest.writeString(author);
      dest.writeString(type);
      dest.writeString(String.valueOf(releaseDate));
      dest.writeString(description);
      dest.writeString(link);
  }
  
  public static final Parcelable.Creator&lt;Book&gt; CREATOR = new Parcelable.Creator&lt;Book&gt;() {
       public Book createFromParcel(Parcel in) {
           return new Book(in);
       }
  
       public Book[] newArray(int size) {
           return new Book[size];
       }
  };
  
  @Override
  public int compareTo(Book another) {
      if(orderby == 2){
          return this.getAuthor().compareTo(another.getAuthor());
      } else if(orderby == 3){
          return this.getReleaseDate() - another.getReleaseDate();
      } else{
          return this.getTitle().compareTo(another.getTitle());
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>public ArrayList&lt;Book&gt; beolvas(JsonReader reader) {
      try {
          ArrayList&lt;Book&gt; books = new ArrayList&lt;Book&gt;();
          Book book;
          String name;
          reader.beginArray();
          while (reader.hasNext()) {
              reader.beginObject();
              book = new Book(0, null, null, null, 0, null, null);
              while (reader.hasNext()) {
                  name = reader.nextName();
                  if (name.equals("id")) {
                      book.id = reader.nextInt();
                  } else if (name.equals("title")) {
                      book.title = reader.nextString();
                  } else if (name.equals("author")) {
                      book.author = reader.nextString();
                  } else if (name.equals("releasedate")) {
                      book.releaseDate = Integer.parseInt(reader.nextString());
                  } else if (name.equals("type")) {
                      book.type = reader.nextString();
                  } else if (name.equals("description")) {
                      book.description = reader.nextString();
                  } else {
                      book.link = reader.nextString();
                  }
              }
              reader.endObject();
              books.add(book);
          }
          reader.endArray();
          reader.close();
          return books;
      } catch (FileNotFoundException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      return null;
  }
  </code></pre>