Modeling more complex JSON

I’ve tried to code my Vapor app to return JSON of the following structure:

{
“getCollectionsResult”: [ {
“__type”: “CollectionSet:#MobileServices”,
“operationSuccess”: true,
“SetName”: “Spring 2 2018”
},
{
“__type”: “CollectionSet:#MobileServices”,
“operationSuccess”: true,
“SetName”: “Summer 1 2018”
}
]
}

I’ve followed Tim’s suggestion from a previous post, but could not come up with something that works. Can I ask you to take a look at this again. It’s holding me up getting my app up and running. The original question (and the code I tried) was in the post named “Modeling Complex JSON”. Thank you.

@0xtim Do you have any feedback about this? Thank you - much appreciated! :]

@rcutshaw

I posted a solution (hopefully!) over in the “Modeling Complex JSON” thread.

Have fun!

1 Like