Created
April 4, 2019 01:35
-
-
Save dimohamdy/b82bd09d3189d0c4dccd7dd56be25c50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let jsonString = """ | |
{ | |
"id": 1, | |
"name": "yearly.plan", | |
"display_name": "الباقة اليومية", | |
"payment_method_key": "1", | |
"number_of_days": "35", | |
"payment_method_id": 3 | |
} | |
""" | |
let jsonData = jsonString.data(using: .utf8)! | |
let user = try! JSONDecoder().decode(Plan.self, from: jsonData) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment