     ///   - defaultValues: Value to default to when key is not present
     /// - Returns: An array of `Mappable` types
     /// - Throws: A DecodeError iff the key is empty and defaultValue is not defined
-    func from<T: Mappable>(_ key: String, or defaultValues: [T]? = nil) throws -> [T] {
+    public func from<T: Mappable>(_ key: String, or defaultValues: [T]? = nil) throws -> [T] {
         guard let array = self[key]?.array else {
             if let defaultValues = defaultValues {
                 return defaultValues

    ///   - defaultValue: Value to default to when key is not present
    /// - Returns: The `Mappable` type
    /// - Throws: A DecodeError iff the key is empty and defaultValue is not defined
    func from<T: Mappable>(_ key: String, or defaultValue: T? = nil) throws -> T {
        guard let json = self[key], let value = try? T.decode(json) else {
            if let defaultValue = defaultValue {
                return defaultValue

import Foundation

public extension JSON {
    /// Decodes any `Mappable` type into itself or a default value
    ///
    /// - Parameters:
