code: public void writeNotificationRegistration(OutputStream out, NotificationRegistration value) throws IOException {
          writeStartObject(out);
          writeObjectNameField(out, OM_OBJECTNAME, value.objectName);
          writeNotificationFiltersField(out, OM_FILTERS, value.filters);
          writeEndObject(out);
      }
docs: Encode a NotificationRegistration instance as JSON:
  {
  "objectName" : ObjectName,
  "filters" : [ NotificationFilter* ]
  }
  
  @param out The stream to write JSON to
  @param value The NotificationRegistration instance to encode.
  Can't be null. See writeNotificationFilters() for
  requirements on the filters.
  @throws IOException If an I/O error occurs
  @see #readNotificationRegistration(InputStream)
  @see #writeNotificationFilters(OutputStream, NotificationFilter[])