---
title: jsonRepresentation()
framework: metrickit
role: symbol
role_heading: Instance Method
path: metrickit/mxdiagnostic/jsonrepresentation()
---

# jsonRepresentation()

Returns the contents of the diagnostic in JSON format.

## Declaration

```swift
func jsonRepresentation() -> Data
```

## Return Value

Return Value A Data (Swift) or NSData (Objective-C) object containing the JSON representation of the contents of the diagnostic.

## See Also

### Generating a report

- [dictionaryRepresentation()](metrickit/mxdiagnostic/dictionaryrepresentation().md)
