# WireMock.Util.JsonUtils - Coverage Report

# Summary

Class: | WireMock.Util.JsonUtils
Assembly: | WireMock.Net
File(s): | C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Util\JsonUtils.cs
Covered lines: | 5
Uncovered lines: | 2
Coverable lines: | 7
Total lines: | 18
Line coverage: | 71.4%
Branch coverage: | 50%

# Metrics

Method | Cyclomatic complexity | NPath complexity | Sequence coverage | Branch coverage
--- | --- | --- | --- | ---
ParseJTokenToObject(...) | 3 | 4 | 71.43 | 60

# File(s)

## C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Util\JsonUtils.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using Newtonsoft.Json.Linq;`
|  | `2` |  | ``
|  | `3` |  | `namespace WireMock.Util`
|  | `4` |  | `{`
|  | `5` |  | `internal static class JsonUtils`
|  | `6` |  | `{`
|  | `7` |  | `public static T ParseJTokenToObject<T>(object value)`
| 4 | `8` |  | `{`
| 4 | `9` |  | `if (value == null)`
| 0 | `10` |  | `{`
| 0 | `11` |  | `return default(T);`
|  | `12` |  | `}`
|  | `13` |  | ``
| 4 | `14` |  | `var token = value as JToken;`
| 4 | `15` |  | `return token == null ? default(T) : token.ToObject<T>();`
| 4 | `16` |  | `}`
|  | `17` |  | `}`
|  | `18` |  | `}`

# Methods/Properties

ParseJTokenToObject(System.Object)