private static @Nullable Object readEnumValue(JsonValueAdapter value) {
    if (value.isStringLiteral()) {
      return "\"" + StringUtil.unquoteString(value.getDelegate().getText()) + "\"";
    }
    else if (value.isNumberLiteral()) {
      return getNumber(value);
    }
    else if (value.isBooleanLiteral()) {
      return getBoolean(value);
    }
    else if (value.isNull()) {
      return "null";
    }
    else if (value instanceof JsonArrayValueAdapter) {
      return new EnumArrayValueWrapper(
        ((JsonArrayValueAdapter)value).getElements().stream().map(v -> readEnumValue(v)).filter(v -> v != null).toArray());
    }
    else if (value instanceof JsonObjectValueAdapter) {
      return new EnumObjectValueWrapper(((JsonObjectValueAdapter)value).getPropertyList().stream()
                                          .filter(p -> p.getValues().size() == 1)
                                          .map(p -> Pair.create(p.getName(), readEnumValue(p.getValues().iterator().next())))
                                          .filter(p -> p.second != null)
                                          .collect(Collectors.toMap(p -> p.first, p -> p.second)));
    }
    return null;
  }
private static @Nullable Object readEnumValue(JsonValueAdapter value)