Code example for JsonReader

Methods: peek

0
          out.nullValue();
        } else { 
          TypeAdapter.this.write(out, value);
        } 
      } 
      @Override public T read(JsonReader reader) throws IOException {
        if (reader.peek() == JsonToken.NULL) {
          reader.nextNull();
          return null; 
        } 
        return TypeAdapter.this.read(reader);
      } 
    }; 
  } 
 
  /** 
   * Converts {@code value} to a JSON document. Unlike Gson's similar {@link 
   * Gson#toJson(Object) toJson} method, this write is strict. Create a {@link 
   * JsonWriter#setLenient(boolean) lenient} {@code JsonWriter} and call 
   * {@link #write(com.google.gson.stream.JsonWriter, Object)} for lenient 
Contextual code suggestions in your IDE  Get Codota for Java