code: private JSONWriter end(char m, char c) throws JSONException {
  
          if (m_mode != m) {
              throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray.");
          }
          pop(m);
          try {
              m_writer.write(c);
          } catch (IOException e) {
              throw new JSONException(e);
          }
          m_comma = true;
          return this;
      }
docs: End something.<p>
  
  @param m mode
  @param c closing character
  @return this
  @throws JSONException if unbalanced