Skip to content

Instantly share code, notes, and snippets.

@sergiosette
Created October 17, 2017 19:37
Show Gist options
  • Select an option

  • Save sergiosette/2d0f5b3fff0f27f1bcfb33c3f254bf93 to your computer and use it in GitHub Desktop.

Select an option

Save sergiosette/2d0f5b3fff0f27f1bcfb33c3f254bf93 to your computer and use it in GitHub Desktop.
class JSONParser {
func parse(_ json: String) -> Any? {
return Bool(json) ?? Int(json) ?? Double(json)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment