Relative Content

Tag Archive for swiftcodable

swift serialize [any Codable]

As part of a rewrite from a C++ codebase, I have a class with an array of any V, where V extends Codable. How can I create the required init and encode functions here?

cannot assign to property: ” is a ‘let’ in swift

I am writing some requests that I need to convert json string as input to some type of Codable as payload. however, I have the error shows cannot assign to property: 'payload' is a 'let' under the function. why is it?