how to decoder this JSON swift4 [on hold]
up vote
-8
down vote
favorite
{
"src_1DWmQHHj9Rng7qOhOUW382Dz": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": true
},
"src_1DWnwZHj9Rng7qOhyurpV0bY": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": false
},
"selectedCard": {
"last4": "src_1DWmQHHj9Rng7qOhOUW382Dz"
}
}
ios swift jsondecoder
put on hold as too broad by Dávid Pásztor, Moritz, gnat, greg-449, Umair 2 days ago
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
|
show 7 more comments
up vote
-8
down vote
favorite
{
"src_1DWmQHHj9Rng7qOhOUW382Dz": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": true
},
"src_1DWnwZHj9Rng7qOhyurpV0bY": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": false
},
"selectedCard": {
"last4": "src_1DWmQHHj9Rng7qOhOUW382Dz"
}
}
ios swift jsondecoder
put on hold as too broad by Dávid Pásztor, Moritz, gnat, greg-449, Umair 2 days ago
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
– Scriptable
2 days ago
i created a struct like this :
– Walid Nakbi
2 days ago
struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
– Walid Nakbi
2 days ago
this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
– Walid Nakbi
2 days ago
i am using cloud function firebase to get data :
– Walid Nakbi
2 days ago
|
show 7 more comments
up vote
-8
down vote
favorite
up vote
-8
down vote
favorite
{
"src_1DWmQHHj9Rng7qOhOUW382Dz": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": true
},
"src_1DWnwZHj9Rng7qOhyurpV0bY": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": false
},
"selectedCard": {
"last4": "src_1DWmQHHj9Rng7qOhOUW382Dz"
}
}
ios swift jsondecoder
{
"src_1DWmQHHj9Rng7qOhOUW382Dz": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": true
},
"src_1DWnwZHj9Rng7qOhyurpV0bY": {
"threeDs": false,
"brand": "Visa",
"last4": "4242",
"selected": false
},
"selectedCard": {
"last4": "src_1DWmQHHj9Rng7qOhOUW382Dz"
}
}
ios swift jsondecoder
ios swift jsondecoder
edited 2 days ago
Scriptable
12k43253
12k43253
asked 2 days ago
Walid Nakbi
13
13
put on hold as too broad by Dávid Pásztor, Moritz, gnat, greg-449, Umair 2 days ago
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as too broad by Dávid Pásztor, Moritz, gnat, greg-449, Umair 2 days ago
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
– Scriptable
2 days ago
i created a struct like this :
– Walid Nakbi
2 days ago
struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
– Walid Nakbi
2 days ago
this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
– Walid Nakbi
2 days ago
i am using cloud function firebase to get data :
– Walid Nakbi
2 days ago
|
show 7 more comments
show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
– Scriptable
2 days ago
i created a struct like this :
– Walid Nakbi
2 days ago
struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
– Walid Nakbi
2 days ago
this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
– Walid Nakbi
2 days ago
i am using cloud function firebase to get data :
– Walid Nakbi
2 days ago
show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
– Scriptable
2 days ago
show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
– Scriptable
2 days ago
i created a struct like this :
– Walid Nakbi
2 days ago
i created a struct like this :
– Walid Nakbi
2 days ago
struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
– Walid Nakbi
2 days ago
struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
– Walid Nakbi
2 days ago
this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
– Walid Nakbi
2 days ago
this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
– Walid Nakbi
2 days ago
i am using cloud function firebase to get data :
– Walid Nakbi
2 days ago
i am using cloud function firebase to get data :
– Walid Nakbi
2 days ago
|
show 7 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
show your attempt and explain the problem. This just sounds like a 'do my job for me' post so far
– Scriptable
2 days ago
i created a struct like this :
– Walid Nakbi
2 days ago
struct Params : Decodable{ var threeDs : Bool var brand : String var last4 : String var selected : Bool }
– Walid Nakbi
2 days ago
this is my error :keyNotFound(CodingKeys(stringValue: "threeDs", intValue: nil), Swift.DecodingError.Context(codingPath: [_DictionaryCodingKey(stringValue: "selectedCard", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: "threeDs", intValue: nil) ("threeDs").", underlyingError: nil))
– Walid Nakbi
2 days ago
i am using cloud function firebase to get data :
– Walid Nakbi
2 days ago