Share via


JsonExtensions.IsString(JToken, String) Method

Definition

Indicates whether or not the given JSON token matches the expected string.

public static bool IsString(this Newtonsoft.Json.Linq.JToken token, string expectedValue);
static member IsString : Newtonsoft.Json.Linq.JToken * string -> bool
<Extension()>
Public Function IsString (token As JToken, expectedValue As String) As Boolean

Parameters

token
Newtonsoft.Json.Linq.JToken

The token to check.

expectedValue
String

The expected string value.

Returns

true if the given JSON token matches the expected string, false otherwise.

Applies to