-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make TopLevelEncoder implementation overridable (#182)
`TopLevelEncoder` implementation was added by #175. However, its method cannot be overridden. If it can be, we can use custom root key, root attributes, or header even when we use Combine-style like this: ```swift final class MyEncoder: XMLEncoder { override func encode<T>(_ value: T) throws -> Data where T : Encodable { try self.encode(value, withRootKey: "foo", rootAttributes: nil, header: XMLHeader(version: 1.0, encoding: "UTF-8")) } } ```
- Loading branch information
Showing
3 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters