JsonValueExtensionsGetTimeSpanOrDefault Method

Overload List

GetTimeSpanOrDefault(JsonValue, JsonValueType) 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.
GetTimeSpanOrDefault(JsonValue, JsonTimeFormat, JsonValueType) 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.
GetTimeSpanOrDefault(JsonValue, TimeSpan, JsonValueType) 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.
GetTimeSpanOrDefault(JsonValue, JsonTimeFormat, TimeSpan, JsonValueType) 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.

See Also