code: public JsonWriter endObject() throws IOException {
        checkAndPop(JsonTokenType.BEGIN_OBJECT);
        popIf(JsonTokenType.NAME);
        writer.endObject();
        return this;
     }
docs: Ends the current object
  
  @return This structured writer
  @throws IOException Something went wrong writing