Code example for JsonReader

Methods: nextNullpeek

0
      } catch (NoSuchFieldException e) {
        throw new AssertionError();
      } 
    } 
    public T read(JsonReader in) throws IOException {
      if (in.peek() == JsonToken.NULL) {
        in.nextNull();
        return null; 
      } 
      return nameToConstant.get(in.nextString());
    } 
 
    public void write(JsonWriter out, T value) throws IOException {
      out.value(value == null ? null : constantToName.get(value));
    } 
  } 
 
  public static final TypeAdapterFactory ENUM_FACTORY = newEnumTypeHierarchyFactory();
 
  public static TypeAdapterFactory newEnumTypeHierarchyFactory() {
Experience pair programming with AI  Get Codota for Java