@hrefcl/apidoc - v4.0.5
    Preparing search index...
    • Parser for payload tags - defines MQTT message payload type and description

      This parser handles the payload tag that defines MQTT message payload format. It extracts:

      • MIME type (application/json, text/plain, etc.)
      • Optional description of payload content

      Parameters

      • content: string

        Raw content from the payload tag

      Returns { mimeType: string; description: string }

      Parsed payload information with mimeType and description, or null if parsing fails

      // Input: "application/json Device telemetry data"
      // Output: { mimeType: "application/json", description: "Device telemetry data" }
      // Input: "text/plain Simple status message"
      // Output: { mimeType: "text/plain", description: "Simple status message" }
      // Input: "application/octet-stream Binary sensor data"
      // Output: { mimeType: "application/octet-stream", description: "Binary sensor data" }
      // Input: "application/xml"
      // Output: { mimeType: "application/xml", description: "" }

      4.1.0