Questions tagged [jsondecoder]

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:

528 questions
-4
votes
1 answer

Decode string key having integer value using JSONDecoder Swift

I am working on decoding JSON data coming from API, and I am stuck in decoding image object having the key with integer value you can see in the screenshot attached, any help should be appreciated.Screenshot
Umair Khan
  • 993
  • 8
  • 14
-4
votes
1 answer

Whats wrong with this JSON string?

I'm trying decoding and accessing the JSON object values from this string, but json_decode in PHP is unable to decode it. {"next_page": "Y", "search_results": [{"name": "Apple iPhone X, Fully Unlocked 5.8\", 64 GB - Silver", "asin": "B075QN8NDH",…
AngularLearner
  • 169
  • 1
  • 2
  • 10
1 2 3
35
36