JObjectExtension.GetInt32 method
Version 1.1.28
.NET Framework 4.8
Namespace | Skybrud.Essentials.Json.Extensions |
---|---|
Assembly | Skybrud.Essentials.dll |
GetInt32(JObject, string)
Static
Gets the int value of the token matching the specified path
, or
0
if path
doesn't match a token.
public static int GetInt32(JObject obj, string path)
GetInt32<T>(JObject, string, Func<T, TResult>)
Static
Gets the int value of the token matching the specified path
and parses
it into an instance of T
, or the default value of T
if path
doesn't
match a token.
public static T GetInt32<T>(JObject obj, string path, Func<T, TResult> callback)
Type Parameters
T
The type of the parsed type.
Returns
T
An instance of int , or 0
if path
doesn't
match a token.