             // JSONSerialization can natively handle NSDecimalNumber.
             return (value as! NSDecimalNumber)
         } else if value is _JSONStringDictionaryEncodableMarker {
-            return try self.box(value as! Dictionary<String, Encodable>)
+            return try self.box(value as! [String : Encodable])
         }
 
         // The value should request a container from the _JSONEncoder.

//
//===----------------------------------------------------------------------===//


fileprivate protocol _JSONStringDictionaryEncodableMarker { }

extension Dictionary : _JSONStringDictionaryEncodableMarker where Key == String, Value: Encodable { }

fileprivate protocol _JSONStringDictionaryDecodableMarker {
    static var elementType: Decodable.Type { get }
}

        }

        return self.storage.popContainer()
    }

    fileprivate func box(_ value: Encodable) throws -> NSObject {
        return try self.box_(value) ?? NSDictionary()
    }

    // This method is called "box_" instead of "box" to disambiguate it from the overloads. Because the return type here is different from all of the "box" overloads (and is more general), any "box" calls in here would call back into "box" recursively instead of calling the appropriate overload, which is not what we want.
