docs: public JsonWriter endArray() {
          if (!context.list()) {
              throw new IllegalStateException("Unexpected end, not in list.");
          }
          writer.write(']');
          context = stack.pop();
          return this;
      }