code: public void writeMBeanQuery(OutputStream out, MBeanQuery value) throws IOException {
          writeStartObject(out);
          writeObjectNameField(out, OM_OBJECTNAME, value.objectName);
          // TODO: Produce proper JSON for QueryExp?
          writeSerializedField(out, OM_QUERYEXP, value.queryExp);
          writeStringField(out, OM_CLASSNAME, value.className);
          writeEndObject(out);
      }
docs: Encode an MBeanQuery instance as JSON:
  {
  "objectName" : ObjectName,
  "queryExp" : Base64,
  "className" : String,
  }
  
  @param out The stream to write JSON to
  @param value The MBeanQuery instance to encode. Can't be null.
  @throws IOException If an I/O error occurs
  @see #readMBeanQuery(InputStream)