code: public void writeServerNotificationRegistration(OutputStream out, ServerNotificationRegistration value) throws IOException {
          writeStartObject(out);
          boolean hasOperation = value.operation != null;
          if (hasOperation) {
              writeSimpleStringField(out, OM_OPERATION, value.operation.name());
          }
          writeObjectNameField(out, OM_OBJECTNAME, value.objectName);
          writeObjectNameField(out, OM_LISTENER, value.listener);
          writeNotificationFilterField(out, OM_FILTER, value.filter);
          writePOJOField(out, OM_HANDBACK, value.handback);
          if (hasOperation) {
              writeIntField(out, OM_FILTERID, value.filterID);
              writeIntField(out, OM_HANDBACKID, value.handbackID);
          }
          writeEndObject(out);
      }
docs: Encode a ServerNotificationRegistration instance as JSON:
  {
  "operation" : ("Add" | "RemoveAll" | "RemoveSpecific")
  "objectName" : ObjectName,
  "listener" : ObjectName,
  "filter" : NotificationFilter,
  "handback" : POJO,
  "filterID" : Integer,
  "handbackID" : Integer
  }
  
  @param out The stream to write JSON to
  @param value The ServerNotificationRegistration instance to encode.
  Can't be null.
  @throws IOException If an I/O error occurs
  @see #readServerNotificationRegistration(InputStream)