JsonValueExtensionsGetDateTimeOffsetOrDefault Method

Overload List

GetDateTimeOffsetOrDefault(JsonValue, JsonValueType) 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.
GetDateTimeOffsetOrDefault(JsonValue, JsonDateTimeFormat, JsonValueType) 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.
GetDateTimeOffsetOrDefault(JsonValue, DateTimeOffset, JsonValueType) 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.
GetDateTimeOffsetOrDefault(JsonValue, String, DateTimeOffset) 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.
GetDateTimeOffsetOrDefault(JsonValue, JsonDateTimeFormat, DateTimeOffset, JsonValueType) 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.

See Also