Skip to content

Instantly share code, notes, and snippets.

@wadheraswati
Last active November 9, 2019 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wadheraswati/62cb4b878368e397f00c1ea73ed931f2 to your computer and use it in GitHub Desktop.
Save wadheraswati/62cb4b878368e397f00c1ea73ed931f2 to your computer and use it in GitHub Desktop.
Encoding Example with URL Encoding and JSON Encoding
struct User: Encodable {
let id: Int
let name: Encodable
enum CodingKeys: String, CodingKey {
case id
case name
}
}
let user = User(id: 1,
name: "John")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment