Buy Premium Account and unlock all features with few steps**]{} (1979) 567;\nE.A. Ivanov and V.I. Ogievetsky, Teor. Mat. Fiz. [**25**]{} (1975) 164;\nV.K. Dobrev, [*J. Phys.*]{} [**A15**]{} (1982) 3449;\nV.K. Dobrev, [*J. Phys.*]{} [**A16**]{} (1983) L199; [*Int. J. Mod. Phys.*]{} [**A6**]{} (1991) 1947.
[^1]: e-mail: nuzhno@lpi.ru
[^2]: e-mail: spekrej@ms2.inr.ac.ru
Q:
How do i create a Json with Swift 4?
I'm trying to create a JSON with swift 4, the json should have two Objects, one with the user data, and the second with the password and the credentials.
I'm getting this error: Value of type 'String' has no member'setImageData'
How do i fix it?
myJSON:
{
"user":{
"title":"bla",
"url":"blabla",
"photo":"user@mail.com",
"id":"1"
},
"pass":"123456",
"credentials":{
"password":"123456",
"id":"1"
}
}
User class:
class User: Codable {
var title: String?
var url: String?
var photo: String?
var id: String?
init(title: String, url: String, photo: String, id: String) {
self.title = title
self.url = url
self ac619d1d87
Related links:
Comments