Skip to content

Commit

Permalink
Remove obsolete comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Smith committed Nov 23, 2016
1 parent 873d7fb commit 3a2d030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json2swift/swift-code-generation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ internal extension TransformationFromJSON {

private static func letStatementForPrimitiveValue(_ attributeName: String, _ propertyName: String, _ type: SwiftPrimitiveValueType) -> LineOfCode {
switch type {
case .any: return "let \(propertyName) = json[\"\(attributeName)\"] as? Any" // Any is treated as optional.
case .any: return "let \(propertyName) = json[\"\(attributeName)\"] as? Any"
case .bool, .int, .string: return "let \(propertyName) = json[\"\(attributeName)\"] as? \(type.name)"
case .double: return "let \(propertyName) = Double(json: json, key: \"\(attributeName)\")" // Allows an integer to be interpreted as a double.
case .url: return "let \(propertyName) = URL(json: json, key: \"\(attributeName)\")"
Expand Down

0 comments on commit 3a2d030

Please sign in to comment.