JsonValue Structure

Represents a value that can be converted to JSON. It can hold JavaScript primitive types such as Null, Boolean, Number and String, and it can be assigned also from JsonArray and JsonObject types. Its default value represents the JavaScript Undefined value. Use the ToString or WriteTo methods to convert it to JSON.

Definition

Namespace: KGySoft.Json
Assembly: KGySoft.Json (in KGySoft.Json.dll) Version: 3.0.0
C#
[SerializableAttribute]
public readonly struct JsonValue : IEquatable<JsonValue>
Inheritance
Object    ValueType    JsonValue
Implements
IEquatableJsonValue

Remarks

A JsonValue instance represents any JavaScript type that can appear in JSON (see also the Type property and the JsonValueType enumeration), including the Undefined value, which is not valid in a JSON document.

The default value of a JsonValue instance equals to the Undefined field, which represents the undefined type in JavaScript. Just like in JavaScript, you can add Undefined values to arrays and objects but when you "stringify" them by the ToString or WriteTo methods, they will be either replaced with Null (in a JsonArray) or simply ignored (in a JsonObject).

C#
JsonValue value = default; // = JsonValue.Undefined; = new JsonValue();

Console.WriteLine(value); // undefined
Console.WriteLine(value.Type); // Undefined
Console.WriteLine(value.IsUndefined); // True
Console.WriteLine(value == JsonValue.Undefined); // True

The Null field represents the null type in JavaScript. Conversion from a .NET is also possible but only with an explicit type cast.

C#
JsonValue value = JsonValue.Null; // = (string)null; = (bool?)null; = (JsonObject)null; etc.

Console.WriteLine(value); // null
Console.WriteLine(value.Type); // Null
Console.WriteLine(value.IsNull); // True
Console.WriteLine(value == JsonValue.Null); // True

A JsonValue can also store a Boolean value, which can be either the value of the True or False fields. An implicit conversion from the .NET Boolean type also exists.

C#
JsonValue value = true; // = JsonValue.True; = new JsonValue(true);

Console.WriteLine(value); // true
Console.WriteLine(value.Type); // Boolean
Console.WriteLine(value.AsBoolean); // True
Console.WriteLine(value == JsonValue.True); // True
Console.WriteLine(value == true); // True

A JsonValue can also store a Number. Though a JavaScript number is always a double-precision 64-bit binary format IEEE 754 value, which is the same as the .NET Double type, a JsonValue can hold any number with any precision. You can use the AsNumber property to get the same value as JavaScript would also get and the AsLiteral property, which returns the actual value as it will be dumped when converting the value to JSON. An implicit conversion from the .NET Double type also exists.

  Caution

It is not recommended to write wide numeric .NET types (Int64, Decimal, etc.) as a JSON Number because when processed by JavaScript, the precision of these values might be lost without any warning. If you are sure that you want to store such values as numbers, use the CreateNumberUnchecked(String) method or the JsonValueExtensions.ToJson overloads with asString: false parameter.
C#
JsonValue value = 1.25; // = new JsonValue(1.25);

Console.WriteLine(value); // 1.25
Console.WriteLine(value.Type); // Number
Console.WriteLine(value.AsNumber); // 1.25

// Using a long value beyond double precision
long longValue = (1L << 53) + 1;
value = longValue; // this produces a compile-time warning about possible loss of precision
Console.WriteLine(value); // 9007199254740993
Console.WriteLine($"{value.AsNumber:R}"); // 9007199254740992 - this is what JavaScript will see
Console.WriteLine(value.AsLiteral); // 9007199254740993 - this is the actual stored value

value = longValue.ToJson(asString: false); // this is how the compile-time warning can be avoided
Console.WriteLine(value); // 9007199254740993

value = longValue.ToJson(); // this is the recommended solution to prevent losing precision
Console.WriteLine(value); // "9007199254740993" - note that ToJson produces strings for wide numeric types by default

A JsonValue can also store a String. An implicit conversion from the .NET String type also exists.

C#
JsonValue value = "some \"value\""; // = new JsonValue("some \"value\"");

Console.WriteLine(value); // "some \"value\""
Console.WriteLine(value.Type); // String
Console.WriteLine(value.AsString); // some "value"

A JsonValue can also store an Array, which is represented by the JsonArray type. An implicit conversion from JsonArray also exists. If a JsonValue represents an array, then you can use the int indexer to access the array elements. Just like in JavaScript, accessing an invalid index returns Undefined. To change array values use the JsonArray instance returned by the AsArray property.

C#
JsonValue value = new JsonArray { true, 1, 2.35, JsonValue.Null, "value" };
// which is the shorthand of: new JsonValue(new JsonArray { JsonValue.True, new JsonValue(1), new JsonValue(2.35), JsonValue.Null, new JsonValue("value") });

Console.WriteLine(value); // [true,1,2.35,null,"value"]
Console.WriteLine(value.Type); // Array
Console.WriteLine(value[2]); // 2.35
Console.WriteLine(value[42]); // undefined

A JsonValue can also store an Object, which is represented by the JsonObject type. An implicit conversion from JsonObject also exists. If a JsonValue represents an object, then you can use the string indexer to access the properties by name. Just like in JavaScript, accessing a nonexistent property returns Undefined. To change object properties use the JsonObject instance returned by the AsObject property.

C#
JsonValue value = new JsonObject
{
    ("Bool", true), // which is the shorthand of new JsonProperty("Bool", new JsonValue(true))
    // { "Bool", true }, // alternative syntax on platforms where ValueTuple types are not available
    ("Number", 1.23),
    ("String", "value"),
    ("Object", new JsonObject
    {
       ("Null", JsonValue.Null),
       ("Array", new JsonArray { 42 }),
    })
};

Console.WriteLine(value); // {"Bool":true,"Number":1.23,"String":"value","Object":{"Null":null,"Array":[42]}}
Console.WriteLine(value.Type); // Object
Console.WriteLine(value["Object"]); // {"Null":null,"Array":[42]}
Console.WriteLine(value["Object"]["Array"]); // [42]
Console.WriteLine(value["Object"]["Array"][0]); // 42
Console.WriteLine(value["UnknownProperty"]); // undefined

  Tip

JsonValue members provide conversions to and from types that have their counterpart in JavaScript. If you want to treat the JSON Number and String types as specific .NET types such as Int64, Decimal, Enum, DateTime, Guid and more, then use the extension methods of the JsonValueExtensions class. It also has a bunch of ToJson methods that can convert the common .NET types to JsonValue.

Example

The following examples demonstrate how to serialize and deserialize objects to and from JsonValue.

  Note

KGySoft.Json has no built-in automated ways to serialize and deserialize C# types. But in practice even when using other serializers you either need to decorate the C# classes with attributes or you have to define converters where you specify the exact mapping because .NET classes and JSON objects usually cannot be just automatically mapped to each other if they both follow the usual naming conventions. The following examples show how to manually do the serialization and deserialization, which actually can be more effective than letting a serializer resolve attributes or expressions by reflection.

Consider the following JSON document:

JSON
{
  "id": "a4a5b192-fac9-4d7c-a826-1653761fe200",
  "firstName": "John",
  "lastName": "Smith",
  "birth": "19780611",
  "active": true,
  "lastLogin": 1579955315,
  "status": "fully-trusted",
  "balances": [
    {
      "currency": "USD",
      "balance": "23462.4527"
    },
    {
      "currency": "BTC",
      "balance": "0.0567521461"
    }
  ]
}

And the corresponding C# model:

C#
public class Account
{
    public Guid Id { get; set; }
    public string FirstName { get; set; }
    public string? MiddleName { get; set; } // optional
    public string LastName { get; set; }
    public DateTime DateOfBirth { get; set; } // yyyyMMdd
    public bool IsActive { get; set; }
    public DateTime? LastLogin { get; set; } // Stored as Unix seconds
    public AccountStatus Status { get; set; } // Stored as lowercase values with hyphens
    public IList<AccountBalance> Balances { get; } = new Collection<AccountBalance>();
}

public enum AccountStatus { Basic, Confirmed, FullyTrusted, Disabled } // It follows the .NET naming conventions

public class AccountBalance
{
   public string Currency { get; set; }
   public decimal Balance { get; set; }
}

Serialization: When serializing, we just build a JsonValue. The actual serialization is done by the ToString or WriteTo methods.

C#
// in this example conversion is separated from the model as an extension method
public static JsonValue ToJson(this Account acc)
{
    var result = new JsonObject
    {
        ("id", acc.Id.ToJson()), // using ToJson(Guid)
        ("firstName", acc.FirstName), // implicit conversion from string
        ("lastName", acc.LastName), // implicit conversion from string
        ("birth", acc.DateOfBirth.ToJson("yyyyMMdd")), // ToJson(DateTime, string) with exact format
        ("active", acc.IsActive), // implicit conversion from bool
        ("lastLogin", acc.LastLogin.ToJson(JsonDateTimeFormat.UnixSeconds, asString: false)), // Unix seconds as number
        ("status", acc.Status.ToJson(JsonEnumFormat.LowerCaseWithHyphens)) // using ToJson<TEnum>()
    };

    // adding the optional middle name (it wasn't defined in the example JSON above)
    if (acc.MiddleName != null)
        result.Add("middleName", acc.MiddleName); // or: result["middleName"] = acc.MiddleName;

    // for collections and nested objects we can delegate the job to other extension methods
    if (acc.Balances.Count > 0)
        result["balances"] = new JsonArray(acc.Balances.Select(b => b.ToJson()));

    return result; // now it will be converted to JsonValue but we can also change the return type to JsonObject
}

public static JsonValue ToJson(this AccountBalance balance) => new JsonObject
{
    ("currency", balance.Currency), // implicit conversion from string
    ("balance", balance.Balance.ToJson(asString: true)), // the default of ToJson(decimal) would be a string anyway
};

Deserialization: Once you have a parsed JsonValue (see the Parse and TryParse methods), retrieving the values becomes very straightforward:

C#
// as above, this is now an extension method but could be even a constructor with JsonValue or JsonObject parameter
public static Account ToAccount(this JsonValue json)
{
    // Here we mainly use the As... methods that return null if the conversion fails
    // but you can also use the TryGet... or Get...OrDefault methods.
    var result = new Account
    {
        Id = json["id"].AsGuid() ?? throw new ArgumentException("'id' is missing or invalid"),
        FirstName = json["firstName"].AsString ?? throw new ArgumentException("'firstName' is missing or invalid"),
        MiddleName = json["middleName"].AsString, // simply returns null if missing (json["middleName"].IsUndefined)
        LastName = json["lastName"].AsString ?? throw new ArgumentException("'lastName' is missing or invalid"),
        DateOfBirth = json["birth"].AsDateTime("yyyyMMdd") ?? throw new ArgumentException("'birth' is missing or invalid"),
        IsActive = json["active"].GetBooleanOrDefault(false), // it will be false if missing (could be AsBoolean ?? false)
        LastLogin = json["lastLogin"].AsDateTime(JsonDateTimeFormat.UnixSeconds), // will be null if missing or invalid
        Status = json["status"].GetEnumOrDefault(true, AccountStatus.Disabled) // true to ignore case and hyphens
    };

    var balances = json["balances"];

    // a missing 'balances' is accepted
    if (balances.IsUndefined) // or: balances == JsonValue.Undefined
        return result;

    // but if exists, must be an array
    if (balances.Type != JsonValueType.Array) // or: balances.AsArray is not JsonArray
        throw new ArgumentException("'balances' is invalid");

    foreach (JsonValue balance in balances.AsArray)
        result.Balances.Add(balance.ToBalance());

    return result;
}

public static AccountBalance ToBalance(this JsonValue json) => new AccountBalance
{
    Currency = json["currency"].AsString ?? throw new ArgumentException("'currency' is missing or invalid"),
    Balance = json["balance"].AsDecimal() ?? 0m // or AsDecimal(JsonValueType.String) to disallow JSON numbers
};

Constructors

JsonValue(Boolean) Initializes a new JsonValue struct that represents a boolean value. An implicit conversion from the bool type also exists.
JsonValue(Double) Initializes a new JsonValue struct that represents a number. An implicit conversion from the double type also exists. Some .NET numeric types such as long and decimal are not recommended to be encoded as JSON numbers. Use the ToJson extension methods if you still want to do so.
JsonValue(JsonArray) Initializes a new JsonValue struct that represents an array.
JsonValue(JsonObject) Initializes a new JsonValue struct that represents an object.
JsonValue(String) Initializes a new JsonValue struct that represents a string. An implicit conversion from the string type also exists.

Properties

AsArray Gets this JsonValue instance as a JsonArray if it has Array Type; or , if its Type is not Array.
AsBoolean Gets the bool value of this JsonValue instance if it has Boolean Type; or , if its Type is not Boolean. To interpret other types as boolean you can use the AsBoolean(JsonValue, JsonValueType) extension method instead.
AsLiteral If this JsonValue represents a primitive JavaScript type (Undefined, Null, Boolean, Number, String) or its Type is UnknownLiteral, then gets the underlying string literal; otherwise, gets .
AsNumber Gets the numeric value of this JsonValue instance if it has Number Type; or , if its Type is not Number. The returned value is a double to be conform with JSON Number type. To retrieve the actual stored raw value use the AsLiteral property. To retrieve the value as .NET numeric types use the methods in the JsonValueExtensions class.
AsObject Gets this JsonValue instance as a JsonObject if it has Object Type; or , if its Type is not Object.
AsString Gets the string value of this JsonValue instance if it has String Type; or , if its Type is not String.
IsNull Gets whether this JsonValue instance has Null Type and equals to the Null instance.
IsUndefined Gets whether this JsonValue instance has Undefined Type and equals to the Undefined instance.
ItemInt32 If the type of this JsonValue is Array and arrayIndex is within the valid bounds, then gets the value at the specified arrayIndex; otherwise, returns Undefined. Just like in JavaScript, using an invalid index returns Undefined.
ItemReadOnlySpanChar If the type of this JsonValue is Object and propertyName denotes an existing property, then gets the value of the specified propertyName; otherwise, returns Undefined.
ItemString If the type of this JsonValue is Object and propertyName denotes an existing property, then gets the value of the specified propertyName; otherwise, returns Undefined.
ItemStringSegment If the type of this JsonValue is Object and propertyName denotes an existing property, then gets the value of the specified propertyName; otherwise, returns Undefined.
Type Gets the JavaScript type of this JsonValue.

Methods

CreateLiteralUnchecked Creates a JsonValue that forcibly treats value as a JSON literal, even if it is invalid in JSON.
CreateNumberUnchecked Creates a JsonValue that forcibly treats value as a JSON number, even if it cannot be represented as a valid number in JavaScript.
Equals(JsonValue) Indicates whether the current JsonValue instance is equal to another one specified in the other parameter.
Equals(Object) Determines whether the specified object is equal to this instance. Allows comparing also to JsonArray, JsonObject, string, bool and .NET numeric types.
(Overrides ValueTypeEquals(Object))
GetHashCode Returns a hash code for this JsonValue instance.
(Overrides ValueTypeGetHashCode)
Parse(String) Reads a JsonValue from a string that contains JSON data.
Parse(TextReader) Reads a JsonValue from a TextReader that contains JSON data.
Parse(Stream, Encoding) Reads a JsonValue from a Stream that contains JSON data.
ToString Returns a minimized JSON string that represents this JsonValue.
(Overrides ValueTypeToString)
ToString(String) Returns a JSON string that represents this JsonValue.
TryParse(String, JsonValue) Tries to read a JsonValue from a string that contains JSON data.
TryParse(TextReader, JsonValue) Tries to read a JsonValue from a TextReader that contains JSON data.
TryParse(Stream, JsonValue, Encoding) Tries to read a JsonValue from a Stream that contains JSON data.
WriteTo(StringBuilder, String) Writes this JsonValue instance into a StringBuilder.
WriteTo(TextWriter, String) Writes this JsonValue instance into a TextReader.
WriteTo(Stream, Encoding, String) Writes this JsonValue instance into a Stream using the specified encoding.

Operators

Equality(JsonValue, JsonValue) Determines whether two specified JsonValue instances have the same value.
(JsonValue to JsonArray) Performs an explicit conversion from JsonValue to JsonArray. The conversion succeeds if the Type property is Null or Array; otherwise, an InvalidCastException is thrown.
(JsonValue to JsonObject) Performs an explicit conversion from JsonValue to JsonObject. The conversion succeeds if the Type property is Null or Object; otherwise, an InvalidCastException is thrown.
(JsonValue to NullableBoolean) Performs an explicit conversion from JsonValue to nullable bool. The conversion succeeds if the Type property is Null or Boolean; otherwise, an InvalidCastException is thrown.
(JsonValue to NullableDouble) Performs an explicit conversion from JsonValue to nullable double. The conversion succeeds if the Type property is Null or Number; otherwise, an InvalidCastException is thrown.
(JsonValue to String) Performs an explicit conversion from JsonValue to string. The conversion succeeds if the Type property is Null or String; otherwise, an InvalidCastException is thrown.
(Boolean to JsonValue) Performs an implicit conversion from bool to JsonValue.
(Double to JsonValue) Performs an implicit conversion from double to JsonValue.
(Int32 to JsonValue) Performs an implicit conversion from int to JsonValue.
(Int64 to JsonValue) Performs an implicit conversion from long to JsonValue. This operator exists only to produce a warning because otherwise the implicit conversion from double would also match Int64 values.
Obsolete.
(JsonArray to JsonValue) Performs an implicit conversion from JsonArray to JsonValue.
(JsonObject to JsonValue) Performs an implicit conversion from JsonObject to JsonValue.
(NullableBoolean to JsonValue) Performs an implicit conversion from nullable bool to JsonValue.
(NullableDouble to JsonValue) Performs an implicit conversion from nullable double to JsonValue.
(NullableInt32 to JsonValue) Performs an implicit conversion from nullable int to JsonValue.
(NullableInt64 to JsonValue) Performs an implicit conversion from nullable long to JsonValue. This operator exists only to produce a warning because otherwise the implicit conversion from double would also match Int64 values.
Obsolete.
(NullableUInt32 to JsonValue) Performs an implicit conversion from nullable uint to JsonValue.
(NullableUInt64 to JsonValue) Performs an implicit conversion from nullable ulong to JsonValue. This operator exists only to produce a warning because otherwise the implicit conversion from double would also match UInt64 values.
Obsolete.
(String to JsonValue) Performs an implicit conversion from string to JsonValue.
(UInt32 to JsonValue) Performs an implicit conversion from uint to JsonValue.
(UInt64 to JsonValue) Performs an implicit conversion from ulong to JsonValue. This operator exists only to produce a warning because otherwise the implicit conversion from double would also match UInt64 values.
Obsolete.
Inequality(JsonValue, JsonValue) Determines whether two specified JsonValue instances have different values.

Fields

False Represents the JavaScript false value. The Type of the value is Boolean.
Null Represents the JavaScript null value. The Type of the value is also Null.
True Represents the JavaScript true value. The Type of the value is Boolean.
Undefined Represents the JavaScript undefined value. The Type of the value is also Undefined. This is the value of a default JsonValue instance.

Extension Methods

AsBigInteger Gets the specified JsonValue as a BigInteger value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to BigInteger; otherwise, returns .
(Defined by JsonValueExtensions)
AsBoolean Gets the specified JsonValue as a Boolean value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Boolean; otherwise, returns . This method allows interpreting numeric values as booleans where nonzero values are .
(Defined by JsonValueExtensions)
AsByte Gets the specified JsonValue as a Byte value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Byte; otherwise, returns .
(Defined by JsonValueExtensions)
AsDateOnly Gets the specified JsonValue as a DateOnly value using the specified format if Type property of the specified json parameter is String and it can be converted to DateOnly; otherwise, returns .
(Defined by JsonValueExtensions)
AsDateOnly Gets the specified JsonValue as a DateOnly value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateOnly; otherwise, returns .
(Defined by JsonValueExtensions)
AsDateTime Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns .
(Defined by JsonValueExtensions)
AsDateTime Gets the specified JsonValue as a DateTime value using the specified format if Type property of the specified json parameter is String and it can be converted to DateTime; otherwise, returns .
(Defined by JsonValueExtensions)
AsDateTime Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns .
(Defined by JsonValueExtensions)
AsDateTimeOffset Gets the specified JsonValue as a DateTimeOffset value using the specified format if Type property of the specified json parameter is String and it can be converted to DateTimeOffset; otherwise, returns .
(Defined by JsonValueExtensions)
AsDateTimeOffset Gets the specified JsonValue as a DateTimeOffset value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTimeOffset; otherwise, returns .
(Defined by JsonValueExtensions)
AsDecimal Gets the specified JsonValue as a Decimal value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Decimal; otherwise, returns .
(Defined by JsonValueExtensions)
AsDouble Gets the specified JsonValue as a Double value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Double; otherwise, returns .
(Defined by JsonValueExtensions)
AsEnumTEnum Gets the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TEnum; otherwise, returns .
(Defined by JsonValueExtensions)
AsEnumTEnum Gets the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TEnum; otherwise, returns .
(Defined by JsonValueExtensions)
AsEnumTEnum Gets the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TEnum; otherwise, returns .
(Defined by JsonValueExtensions)
AsGuid Gets the specified JsonValue as a Guid value if Type property of the specified json parameter is String.
(Defined by JsonValueExtensions)
AsHalf Gets the specified JsonValue as a Half value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Half; otherwise, returns .
(Defined by JsonValueExtensions)
AsInt128 Gets the specified JsonValue as an Int128 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int128; otherwise, returns .
(Defined by JsonValueExtensions)
AsInt16 Gets the specified JsonValue as an Int16 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int16; otherwise, returns .
(Defined by JsonValueExtensions)
AsInt32 Gets the specified JsonValue as an Int32 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int32; otherwise, returns .
(Defined by JsonValueExtensions)
AsInt64 Gets the specified JsonValue as an Int64 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int64; otherwise, returns .
(Defined by JsonValueExtensions)
AsSByte Gets the specified JsonValue as an SByte value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to SByte; otherwise, returns .
(Defined by JsonValueExtensions)
AsSingle Gets the specified JsonValue as a Single value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Single; otherwise, returns .
(Defined by JsonValueExtensions)
AsString Gets the specified JsonValue as a String value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to String; otherwise, returns .
(Defined by JsonValueExtensions)
AsTimeOnly Gets the specified JsonValue as a TimeOnly value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeOnly; otherwise, returns .
(Defined by JsonValueExtensions)
AsTimeSpan Gets the specified JsonValue as a TimeSpan value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeSpan; otherwise, returns .
(Defined by JsonValueExtensions)
AsUInt128 Gets the specified JsonValue as an UInt128 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt128; otherwise, returns .
(Defined by JsonValueExtensions)
AsUInt16 Gets the specified JsonValue as an UInt16 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt16; otherwise, returns .
(Defined by JsonValueExtensions)
AsUInt32 Gets the specified JsonValue as an UInt32 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt32; otherwise, returns .
(Defined by JsonValueExtensions)
AsUInt64 Gets the specified JsonValue as an UInt64 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt64; otherwise, returns .
(Defined by JsonValueExtensions)
GetBigIntegerOrDefault Gets the specified JsonValue as a BigInteger value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to BigInteger; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetBigIntegerOrDefault Gets the specified JsonValue as a BigInteger value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to BigInteger; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetBooleanOrDefault Gets the specified JsonValue as a Boolean value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Boolean; otherwise, returns , which is the default value of Boolean. This method allows interpreting numeric values as booleans where nonzero values are .
(Defined by JsonValueExtensions)
GetBooleanOrDefault Gets the specified JsonValue as a Boolean value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Boolean; otherwise, returns defaultValue. This method allows interpreting numeric values as booleans where nonzero values are .
(Defined by JsonValueExtensions)
GetByteOrDefault Gets the specified JsonValue as a Byte value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Byte; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetByteOrDefault Gets the specified JsonValue as a Byte value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Byte; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetDateOnlyOrDefault Gets the specified JsonValue as a DateOnly value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateOnly; otherwise, returns DateOnly.MinValue, which is the default value of DateOnly. The actual format is attempted to be auto detected. If you know exact format use the other GetDateOnlyOrDefault overloads.
(Defined by JsonValueExtensions)
GetDateOnlyOrDefault Gets the specified JsonValue as a DateOnly value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateOnly; otherwise, returns defaultValue. The actual format is attempted to be auto detected. If you know exact format use the other GetDateOnlyOrDefault overloads.
(Defined by JsonValueExtensions)
GetDateOnlyOrDefault Gets the specified JsonValue as a DateOnly value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateOnly; otherwise, returns DateOnly.MinValue, which is the default value of DateOnly.
(Defined by JsonValueExtensions)
GetDateOnlyOrDefault Gets the specified JsonValue as a DateOnly value using the specified format if Type property of the specified json parameter is String and it can be converted to DateOnly; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetDateOnlyOrDefault Gets the specified JsonValue as a DateOnly value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateOnly; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetDateTimeOffsetOrDefault Gets the specified JsonValue as a DateTimeOffset value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTimeOffset; otherwise, returns DateTimeOffset.MinValue, which is the default value of DateTimeOffset. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOffsetOrDefault overloads.
(Defined by JsonValueExtensions)
GetDateTimeOffsetOrDefault Gets the specified JsonValue as a DateTimeOffset value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTimeOffset; otherwise, returns defaultValue. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOffsetOrDefault overloads.
(Defined by JsonValueExtensions)
GetDateTimeOffsetOrDefault Gets the specified JsonValue as a DateTimeOffset value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTimeOffset; otherwise, returns DateTimeOffset.MinValue, which is the default value of DateTimeOffset.
(Defined by JsonValueExtensions)
GetDateTimeOffsetOrDefault Gets the specified JsonValue as a DateTimeOffset value using the specified format if Type property of the specified json parameter is String and it can be converted to DateTimeOffset; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetDateTimeOffsetOrDefault Gets the specified JsonValue as a DateTimeOffset value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTimeOffset; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOrDefault overloads.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns defaultValue. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOrDefault overloads.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOrDefault overloads.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value using the specified format if Type property of the specified json parameter is String and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns defaultValue. The actual format is attempted to be auto detected. If you know exact format use the other GetDateTimeOrDefault overloads.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns DateTime.MinValue, which is the default value of DateTime.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value using the specified format if Type property of the specified json parameter is String and it can be converted to DateTime; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetDateTimeOrDefault Gets the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to DateTime; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetDecimalOrDefault Gets the specified JsonValue as a Decimal value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Decimal; otherwise, returns 0.0.
(Defined by JsonValueExtensions)
GetDecimalOrDefault Gets the specified JsonValue as a Decimal value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Decimal; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetDoubleOrDefault Gets the specified JsonValue as a Double value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Double; otherwise, returns 0.0.
(Defined by JsonValueExtensions)
GetDoubleOrDefault Gets the specified JsonValue as a Double value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Double; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetEnumOrDefaultTEnum Gets the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TEnum; otherwise, returns the default value of TEnum.
(Defined by JsonValueExtensions)
GetEnumOrDefaultTEnum Gets the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TEnum; otherwise, returns the default value of TEnum.
(Defined by JsonValueExtensions)
GetEnumOrDefaultTEnum Gets the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TEnum; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetEnumOrDefaultTEnum Gets the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TEnum; otherwise, returns the default value of TEnum.
(Defined by JsonValueExtensions)
GetEnumOrDefaultTEnum Gets the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TEnum; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetEnumOrDefaultTEnum Gets the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TEnum; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetGuidOrDefault Gets the specified JsonValue as a Guid value if Type property of the specified json parameter is String and it can be converted to Guid; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetHalfOrDefault Gets the specified JsonValue as a Half value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Half; otherwise, returns 0.0.
(Defined by JsonValueExtensions)
GetHalfOrDefault Gets the specified JsonValue as a Half value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Half; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetInt128OrDefault Gets the specified JsonValue as an Int128 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int128; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetInt128OrDefault Gets the specified JsonValue as an Int128 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int128; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetInt16OrDefault Gets the specified JsonValue as an Int16 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int16; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetInt16OrDefault Gets the specified JsonValue as an Int16 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int16; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetInt32OrDefault Gets the specified JsonValue as an Int32 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int32; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetInt32OrDefault Gets the specified JsonValue as an Int32 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int32; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetInt64OrDefault Gets the specified JsonValue as an Int64 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int64; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetInt64OrDefault Gets the specified JsonValue as an Int64 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Int64; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetSByteOrDefault Gets the specified JsonValue as an SByte value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to SByte; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetSByteOrDefault Gets the specified JsonValue as an SByte value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to SByte; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetSingleOrDefault Gets the specified JsonValue as a Single value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Single; otherwise, returns 0.0.
(Defined by JsonValueExtensions)
GetSingleOrDefault Gets the specified JsonValue as a Single value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to Single; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetStringOrDefault Gets the specified JsonValue as a String value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to String; otherwise, returns .
(Defined by JsonValueExtensions)
GetStringOrDefault Gets the specified JsonValue as a String value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to String; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetTimeOnlyOrDefault Gets the specified JsonValue as a TimeOnly value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeOnly; otherwise, returns TimeOnly.MinValue, which is the default value of TimeOnly. The actual format is attempted to be auto detected. If you know exact format use the GetTimeOnlyOrDefault(JsonValue, JsonTimeFormat, TimeOnly, JsonValueType) overload instead.
(Defined by JsonValueExtensions)
GetTimeOnlyOrDefault Gets the specified JsonValue as a TimeOnly value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeOnly; otherwise, returns TimeOnly.MinValue, which is the default value of TimeOnly.
(Defined by JsonValueExtensions)
GetTimeOnlyOrDefault Gets the specified JsonValue as a TimeOnly value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeOnly; otherwise, returns defaultValue. The actual format is attempted to be auto detected. If you know exact format use the GetTimeOnlyOrDefault(JsonValue, JsonTimeFormat, TimeOnly, JsonValueType) overload instead.
(Defined by JsonValueExtensions)
GetTimeOnlyOrDefault Gets the specified JsonValue as a TimeOnly value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeOnly; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetTimeSpanOrDefault Gets the specified JsonValue as a TimeSpan value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeSpan; otherwise, returns TimeSpan.Zero, which is the default value of TimeSpan. The actual format is attempted to be auto detected. If you know exact format use the GetTimeSpanOrDefault(JsonValue, JsonTimeFormat, TimeSpan, JsonValueType) overload instead.
(Defined by JsonValueExtensions)
GetTimeSpanOrDefault Gets the specified JsonValue as a TimeSpan value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeSpan; otherwise, returns TimeSpan.Zero, which is the default value of TimeSpan.
(Defined by JsonValueExtensions)
GetTimeSpanOrDefault Gets the specified JsonValue as a TimeSpan value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeSpan; otherwise, returns defaultValue. The actual format is attempted to be auto detected. If you know exact format use the GetTimeSpanOrDefault(JsonValue, JsonTimeFormat, TimeSpan, JsonValueType) overload instead.
(Defined by JsonValueExtensions)
GetTimeSpanOrDefault Gets the specified JsonValue as a TimeSpan value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to TimeSpan; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetUInt128OrDefault Gets the specified JsonValue as an UInt128 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt128; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetUInt128OrDefault Gets the specified JsonValue as an UInt128 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt128; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetUInt16OrDefault Gets the specified JsonValue as an UInt16 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt16; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetUInt16OrDefault Gets the specified JsonValue as an UInt16 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt16; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetUInt32OrDefault Gets the specified JsonValue as an UInt32 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt32; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetUInt32OrDefault Gets the specified JsonValue as an UInt32 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt32; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
GetUInt64OrDefault Gets the specified JsonValue as an UInt64 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt64; otherwise, returns 0.
(Defined by JsonValueExtensions)
GetUInt64OrDefault Gets the specified JsonValue as an UInt64 value if expectedType is Undefined or matches the Type property of the specified json parameter and it can be converted to UInt64; otherwise, returns defaultValue.
(Defined by JsonValueExtensions)
TryGetBigInteger Tries to get the specified JsonValue as a BigInteger value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetBoolean Tries to get the specified JsonValue as a Boolean value if expectedType is Undefined or matches the Type property of the specified json parameter. This method allows interpreting numeric values as booleans where nonzero values are .
(Defined by JsonValueExtensions)
TryGetByte Tries to get the specified JsonValue as a Byte value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetDateOnly Tries to get the specified JsonValue as a DateOnly value if expectedType is Undefined or matches the Type property of the specified json parameter. The actual format is attempted to be auto detected. If you know exact format use the other TryGetDateOnly overloads.
(Defined by JsonValueExtensions)
TryGetDateOnly Tries to get the specified JsonValue as a DateOnly value using the specified format if Type property of the specified json parameter is String.
(Defined by JsonValueExtensions)
TryGetDateOnly Tries to get the specified JsonValue as a DateOnly value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetDateTime Tries to get the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter. The actual format is attempted to be auto detected. If you know exact format use the other TryGetDateTime overloads.
(Defined by JsonValueExtensions)
TryGetDateTime Tries to get the specified JsonValue as a DateTime value if expectedType is Undefined or matches the Type property of the specified json parameter. The actual format is attempted to be auto detected. If you know exact format use the other TryGetDateTime overloads.
(Defined by JsonValueExtensions)
TryGetDateTime Tries to get the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetDateTime Tries to get the specified JsonValue as a DateTime value using the specified format if Type property of the specified json parameter is String.
(Defined by JsonValueExtensions)
TryGetDateTime Tries to get the specified JsonValue as a DateTime value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetDateTimeOffset Tries to get the specified JsonValue as a DateTimeOffset value if expectedType is Undefined or matches the Type property of the specified json parameter. The actual format is attempted to be auto detected. If you know exact format use the other TryGetDateTimeOffset overloads.
(Defined by JsonValueExtensions)
TryGetDateTimeOffset Tries to get the specified JsonValue as a DateTimeOffset value using the specified format if Type property of the specified json parameter is String.
(Defined by JsonValueExtensions)
TryGetDateTimeOffset Tries to get the specified JsonValue as a DateTimeOffset value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetDecimal Tries to get the specified JsonValue as a Decimal value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetDouble Tries to get the specified JsonValue as a Double value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetEnumTEnum Tries to get the specified JsonValue as a TEnum value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetEnumTEnum Tries to get the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetEnumTEnum Tries to get the specified JsonValue as TEnum if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetGuid Tries to get the specified JsonValue as a Guid value if Type property of the specified json parameter is String.
(Defined by JsonValueExtensions)
TryGetHalf Tries to get the specified JsonValue as a Half value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetInt128 Tries to get the specified JsonValue as an Int128 value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetInt16 Tries to get the specified JsonValue as an Int16 value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetInt32 Tries to get the specified JsonValue as an Int32 value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetInt64 Tries to get the specified JsonValue as an Int64 value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetSByte Tries to get the specified JsonValue as an SByte value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetSingle Tries to get the specified JsonValue as a Single value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetString Tries to get the specified JsonValue as a String value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetTimeOnly Tries to get the specified JsonValue as a TimeOnly value if expectedType is Undefined or matches the Type property of the specified json parameter. The actual format is attempted to be auto detected. If you know exact format use the TryGetTimeOnly(JsonValue, JsonTimeFormat, TimeOnly, JsonValueType) overload instead.
(Defined by JsonValueExtensions)
TryGetTimeOnly Tries to get the specified JsonValue as a TimeOnly value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetTimeSpan Tries to get the specified JsonValue as a TimeSpan value if expectedType is Undefined or matches the Type property of the specified json parameter. The actual format is attempted to be auto detected. If you know exact format use the TryGetTimeSpan(JsonValue, JsonTimeFormat, TimeSpan, JsonValueType) overload instead.
(Defined by JsonValueExtensions)
TryGetTimeSpan Tries to get the specified JsonValue as a TimeSpan value using the specified format if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetUInt128 Tries to get the specified JsonValue as an UInt128 value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetUInt16 Tries to get the specified JsonValue as an UInt16 value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetUInt32 Tries to get the specified JsonValue as an UInt32 value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)
TryGetUInt64 Tries to get the specified JsonValue as an UInt64 value if expectedType is Undefined or matches the Type property of the specified json parameter.
(Defined by JsonValueExtensions)

See Also