Code example for JsonReader

Methods: nextNullpeek

0
write(writer.value("11"),);
		 
	} 
    public Point read(JsonReader reader) throws IOException {
      if (reader.peek() == JsonToken.NULL) {
        reader.nextNull();
        return null; 
      } 
      String xy = reader.nextString();
      String[] parts = xy.split(",");
      int x = Integer.parseInt(parts[0]);
      int y = Integer.parseInt(parts[1]);
      return new Point(x, y);
    } 
    public void write(JsonWriter writer, Point value) throws IOException {
      if (value == null) {
        writer.nullValue();
        return; 
      } 
Experience pair programming with AI  Get Codota for Java