Skip to content

Instantly share code, notes, and snippets.

@magnusahlberg
Last active May 2, 2017 10:55
Show Gist options
  • Save magnusahlberg/c7e9408e8dfbc84d9dd998c93e41b245 to your computer and use it in GitHub Desktop.
Save magnusahlberg/c7e9408e8dfbc84d9dd998c93e41b245 to your computer and use it in GitHub Desktop.
import SwiftyJSON
let double: Double = 2.0
let int: Int = 2
let test: [String: Any?] = ["double": double, "int": int]
var json = JSON(test)
print(json.description)
/* Outputs:
{
"double": Optional(2.0),
"int": Optional(2)
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment