Enumeration Caseswift 6.0.3FoundationEssentials
deferredToDate
Defer to Date
for decoding. This is the default strategy.
- iOS
- 8.0+
- macOS
- 10.10+
- tvOS
- 9.0+
- watchOS
- 2.0+
case deferredToDate
Defer to Date
for decoding. This is the default strategy.
case deferredToDate
s20FoundationEssentials11JSONDecoderC20DateDecodingStrategyO010deferredToD0yA2EmF
What are these?1IVMI
import FoundationEssentials
enum DateDecodingStrategy
The strategy to use for decoding Date
values.
class JSONDecoder
JSONDecoder
facilitates the decoding of JSON into semantic Decodable
types.
@preconcurrency case custom((any Decoder) throws -> Date)
Decode the Date
as a custom value decoded by the given closure.
case iso8601
Decode the Date
as an ISO-8601-formatted string (in RFC 3339 format).
case millisecondsSince1970
Decode the Date
as UNIX millisecond timestamp from a JSON number.
case secondsSince1970
Decode the Date
as a UNIX timestamp from a JSON number.