         return _box.codingPath
     }
 
+    /// Encodes a null value for the given key.
+    ///
+    /// - parameter key: The key to associate the value with.
+    /// - throws: `EncodingError.invalidValue` if a null value is invalid in the current context for this format.
+    public mutating func encodeNil(forKey key: Key) throws {
+        try _box.encodeNil(forKey: key)
+    }
+
     /// Encodes the given value for the given key.
     ///
     /// - parameter value: The value to encode.

// Convenience Default Implementations
//===----------------------------------------------------------------------===//

// Default implementation for encodeWeak(_:forKey:) in terms of encode(_:forKey:)
public extension KeyedEncodingContainerProtocol {
    public mutating func encodeWeak<T : AnyObject & Encodable>(_ object: T, forKey key: Key) throws {
        try encode(object, forKey: key)
    }
}

// Default implementation for encodeIfPresent(_:forKey:) in terms of encode(_:forKey:)
public extension KeyedEncodingContainerProtocol {
    public mutating func encodeIfPresent(_ value: Bool?, forKey key: Key) throws {
        guard let value = value else { return }

    /// A `nil` value indicates an unkeyed container.
    var codingPath: [CodingKey?] { get }

    /// Encodes a null value for the given key.
    ///
    /// - parameter key: The key to associate the value with.
    /// - throws: `EncodingError.invalidValue` if a null value is invalid in the current context for this format.
    mutating func encodeNil(forKey key: Key) throws

    /// Encodes the given value for the given key.
    ///
    /// - parameter value: The value to encode.
