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

# jsonRepresentation()

Returns the contents of the payload 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 metrics in the payload.

## See Also

### Generating a report

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