     /// - throws: One of the `JSON.Error` cases thrown by `decode(_:ifNull:type:)`,
     ///   or any error that arises from decoding the contained values.
     /// - seealso: `JSON.decode(_:ifNull:type:)`
-    public func arrayOf<Decoded: JSONDecodable>(first: PathFragment? = nil, _ rest: PathFragment..., ifNull: Swift.Bool) throws -> [Decoded]? {
-        let array = try optionalAtPath(first, rest, ifNotFound: false, ifNull: ifNull) { try $0.array() }
+    public func arrayOf<Decoded: JSONDecodable>(path: PathFragment..., ifNull: Swift.Bool) throws -> [Decoded]? {
+        let array = try optionalAtPath(path, ifNotFound: false, ifNull: ifNull) { try $0.array() }
         return try array?.map(Decoded.init)
     }
 

    ///   * `TypeNotConvertible`: The target value's type inside of the `JSON`
    ///     instance does not match the decoded value.
    ///   * Any error that arises from decoding the value.
    public func decode<Decoded: JSONDecodable>(first: PathFragment? = nil, _ rest: PathFragment..., ifNull: Swift.Bool, type: Decoded.Type = Decoded.self) throws -> Decoded? {
        return try decodedAtPath(first, rest, ifNotFound: false, ifNull: ifNull)
    }

    /// Optionally retrieves a `Double` from a path into JSON.

    /// - returns: An `Dictionary` of `String` mapping to `JSON` elements
    /// - throws: One of the `JSON.Error` cases thrown by `decode(_:or:)`.
    /// - seealso: `JSON.decode(_:or:)`
    public func dictionary(path: PathFragment..., @autoclosure or fallback: () -> [Swift.String: JSON]) throws -> [Swift.String: JSON] {
        let dictionary = try optionalAtPath(path, ifNotFound: true, ifNull: false) { try $0.dictionary() }
        return dictionary ?? fallback()
    }

}

extension JSON.PathFragment: IntegerLiteralConvertible, StringLiteralConvertible {

    public init(integerLiteral value: Int) {
        self = .Index(value)
    }

    public init(unicodeScalarLiteral value: String) {
        self = .Key(value)
    }

    public init(extendedGraphemeClusterLiteral value: String) {
        self = .Key(value)
    }

    public init(stringLiteral value: String) {
        self = .Key(value)
    }

    private var valueType: Any.Type {
        switch self {
        case .Key: return Swift.String
        case .Index: return Swift.Int
        }
    }

}
