Table of Contents

Method TryGetBoolean

Namespace
Xunit.Sdk
Assembly
xunit.v3.common.dll

TryGetBoolean(IReadOnlyDictionary<string, object?>, string)

Tries to get a bool value from a deserialized JSON object.

public static bool? TryGetBoolean(IReadOnlyDictionary<string, object?> obj, string key)

Parameters

obj IReadOnlyDictionary<string, object>

The deserialized JSON object

key string

The key for the value

Returns

bool?

TryGetBoolean(object?)

Tries to get a bool value from a deserialized JSON value.

public static bool? TryGetBoolean(object? value)

Parameters

value object

The deserialized JSON value

Returns

bool?