@Override
  public WordTiming read(JsonReader in) throws IOException {
    if (in.peek() == JsonToken.NULL) {
      in.nextNull();
      return null;
    }

    final WordTiming wordTiming = new WordTiming();
    in.beginArray();

    if (in.peek() == JsonToken.STRING) {
      wordTiming.setWord(in.nextString());
    }
    if (in.peek() == JsonToken.NUMBER) {
      wordTiming.setStartTime(in.nextDouble());
    }
    if (in.peek() == JsonToken.NUMBER) {
      wordTiming.setEndTime(in.nextDouble());
    }

    in.endArray();
    return wordTiming;
  }
@ Override public WordTiming read ( JsonReader in ) throws IOException { if ( in . peek ( ) == JsonToken . NULL ) { in . nextNull ( ) ; return null ; } final WordTiming wordTiming = new WordTiming ( ) ; in . beginArray ( ) ; if ( in . peek ( ) == JsonToken . STRING ) { wordTiming . setWord ( in . nextString ( ) ) ; } if ( in . peek ( ) == JsonToken . NUMBER ) { wordTiming . setStartTime ( in . nextDouble ( ) ) ; } if ( in . peek ( ) == JsonToken . NUMBER ) { wordTiming . setEndTime ( in . nextDouble ( ) ) ; } in . endArray ( ) ; return wordTiming ; }
/*
(non-Javadoc)
@see com.google.gson.TypeAdapter#read(com.google.gson.stream.JsonReader)