code: private void writeJsonObjectBegin(BaseContext context) throws TException {
          getCurrentContext().write();
          if (getCurrentContext().isMapKey()) {
              pushWriter(new ByteArrayOutputStream());
          }
          pushContext(context);
          try {
              getCurrentWriter().writeStartObject();
          } catch (IOException ex) {
              throw new TException(ex);
          }
      }
docs: Helper to write out the beginning of a Thrift type (either struct or map),
  both of which are written as JsonObjects.