toJson

Dependency-free JSON serialization for DiagnosticReport.

Emits the same report schema as the web SDK (OptiViewAds.exportDiagnostics() in @dolby-optiview/ads-sdk-core) so a native report can be fed directly to the @dolby-optiview/ads-sdk-mcp troubleshooting tools and the AI artifacts — i.e. config carries a nested chaining: { enabled, maxGapSeconds }, and level/category are their lowercase string values. This is the format a support engineer or AI assistant consumes; it is verified cross-platform by the MCP test fixtures.