         return try JSONSerializer(value: self, prettyPrint: prettyPrint, lineEndings: lineEndings).serialize()
     }
     
-    /// Returns this enum's associated Array value if it is one, `nil` otherwise.
+    /// Returns this enum's associated Array value iff `self == .array(_)`, `nil` otherwise.
     public var array: [JSON]? {
         guard case .array(let a) = self else { return nil }
         return a
     }
 
-    /// Returns this enum's associated Dictionary value if it is one, `nil` otherwise.
+    /// Returns this enum's associated Dictionary value iff `self == .object(_), `nil` otherwise.
     public var object: [String: JSON]? {
         guard case .object(let o) = self else { return nil }
         return o
     }
 
-    /// Returns this enum's associated String value if it is one, `nil` otherwise.
+    /// Returns this enum's associated String value iff `self == .string(_)`, `nil` otherwise.
     public var string: String? {
         guard case .string(let s) = self else { return nil }
         return s
     }
 
-    /// Returns this enum's associated `JSONInteger` value if it is one, `nil` otherwise.
-    public var int: JSONInteger? {
+    /// Returns this enum's associated `Int64` value as an `Int` iff `self == .integer(_), `nil` otherwise.
+    public var int: Int? {
+        guard case .integer(let i) = self else { return nil }
+        // TODO (ethan): what behaviour does this have when the native Int size is 32 bits?
+        return Int(i)
+    }
+	
+    /// Returns this enum's associated `Int64` iff `self == .integer(_)`, `nil` otherwise.
+    public var int64: Int64? {
         guard case .integer(let i) = self else { return nil }
         return i
     }
 
-    /// Returns this enum's associated Bool value if it is one, `nil` otherwise.
+    /// Returns this enum's associated Bool value iff `self == .bool(_)`, `nil` otherwise.
     public var bool: Bool? {
         guard case .bool(let b) = self else { return nil }
         return b
     }
 
-    /// Returns this enum's associated Double value if it is one, `nil` otherwise.
+    /// Returns this enum's associated Double value iff `self == .double(_)`, `nil` otherwise.
     public var double: Double? {
         guard case .double(let d) = self else { return nil }
         return d

    case InvalidNumber
}

/**
    Allows for the Int representation to be switched quickly
    Will maybe be non conformant to the JSON spec on 32bit machines
    Swift 3 will bring #if os(32bit) I think, that will be an approach to fix this.
*/
public typealias JSONInteger = Int

/// Any value that can be expressed in JSON has a representation in `JSON`.
public enum JSON {
    case object([String: JSON])


// TODO: Support set through these subscripts
extension Optional where Wrapped: _JSONType {
    /// returns the `JSON` value for key iff `Wrapped == JSON.object(_)` and there is a value for the key
    public subscript(key: String) -> JSON? {
        // TODO(ethan): find a better way, should we fatalError() if it isn't `JSON`
        // Would be best if we could constrain extensions to be Non-Generic. Swift3?
