Toggle navigation
Find or Create a Group
EN
EN
DE
ES
FR
IT
UK
EN
DE
ES
FR
IT
UK
Help
Log In
Sign Up
Help
Log In
Sign Up
EN
EN
DE
ES
FR
IT
UK
EN
DE
ES
FR
IT
UK
Home
Messages
Hashtags
×
×
×
Close
Likes
cocoa@apple-dev.groups.io
Topics
Encoding / decoding an Array of structs
×
Close
Search
Date
Date
1 - 1 of 1
previous page
next page
Encoding / decoding an Array of structs
Peter Hudson
#962
Hi All
I’m trying to encode / decode an Array of struct.
The struct in question is itself Codable - and the compiler is happy with it.
In the following code, roles is an Array of struct called Scene…
try
container.encode(roles, forKey: .roles)
and the compiler complains !
Reference to member 'roles' cannot be resolved without a contextual type
roles =
try
container.decode([
SceneRole
].
self
, forKey: .roles)
and the compiler complains !
Ambiguous reference to member 'decode(_:forKey:)
’
Any suggestions gratefully received !
Peter
More
All Messages By This Member
×
Close
Verify Delete
Are you sure you wish to delete this message from the message archives of cocoa@apple-dev.groups.io?
This cannot be undone.
×
Close
Verify Repost
Are you sure you wish to repost this message?
×
Close
Report Message
Reason
Report to Moderators
I think this message isn't appropriate for our group. The Group moderators are responsible for maintaining their community and can address these issues.
Report to Groups.io Support
I think this violates the Terms of Service. This includes: harm to minors, violence or threats, harassment or privacy invasion, impersonation or misrepresentation, fraud or phishing.
Note:
Your email address is included with the abuse report.
×
Close
Split Topic
The new topic will begin with this message. Subject of the new topic:
1 - 1 of 1
previous page
1
next page
Previous Topic
Next Topic
More Options
More
Home
Hashtags
About
Features
Pricing
Updates
Terms
Help
Twitter
Toggle navigation
About
Features
Pricing
Updates
Terms
Help
©
2023
Groups.io