This tag should be used for `JSONDecoder` (introduced in Swift 4) questions for decoding JSON decoder on Apple platforms.
JSONDecoder
is a class, introduced in Swift 4, for decoding JSON on Apple operating systems that conform to Decodable
protocol (or Codable
protocol, which is type alias for Encodable & Codable
). This offers a simple mechanism to easily parse JSON from Decodable
Swift types. This applies to standard Swift collections, such as Array
and Dictionary
, but custom types can conform to Decodable
to participate in this simplified JSON decoding process.
This replaces/supplements the JSONSerialiation
class used in prior Swift versions.
See also: