does this stack overflow post answer your question? https://stackoverflow.com/questions/24109608/json-deserialization-in-swift
all you want is to convert the json object to a swift object so you can access the data, right?
Post
Replies
Boosts
Views
Activity
it sounds like you are either trying to make something that generates swift code, or something to store and load app settings. there are already preferences APIs for the settings part, and while your code can technically write text files with swift code in it and the swift code file extension, including these files to your project so that they can be compiled would still need to be done by the user generating them.
If you can explain your intensions surrounding this question we would be able to give you more relevant answers.