Hi all,
I seem to be having trouble parsing a JSON response from a server that has a unique naming convention for the first item in the object:
{
"@odata.context": "$metadata#Member",
"value": [
{
"MemberKeyNumeric": 123456,
"MemberOfficeNumeric": 123456,
....
},
{
.....
}
]
}
I've written two decodable structs to deal with this, however the naming convention of the first item is throwing an error...
struct wasatchResponse:Decodable{
var @odata.context:String
var value:[valueData]
}
struct valueData:Decodable {
var MemberKeyNumeric:Int
var MemberOfficeNumeric:Int
I am pretty new to swift, so I could be doing this incorrectly? I guess my biggest question is there a way to have swift ignore the '@' and the '.' items, similar to Java using a @SerializedName() argument?
Thanks.
Post
Replies
Boosts
Views
Activity
I am having trouble figuring out how to manage the subscription workflow for an application that is restricted to certain users. I currently have to verify if a user is an "approved" user through an http request, and only after that do I want to have them be charged for a subscription. Is that possible with the in-app subscriptions? I am assuming my workflow would be something like "Customer Download from app store -> Customer submit email or MLS id for verification -> On approval, customer is presented with an in-app purchase screen"? Thanks.