Skip to content

Commit 70c55ec

Browse files
sharpletbwetherfield
authored andcommitted
Conditionally conform to Combine.TopLevelDecoder (CoreOffice#132)
This enables use of `XMLDecoder` with Combine's `decode(_:decoder:)` operator by conditionally conforming to `TopLevelDecoder` when Combine is available. I explored doing the same for `TopLevelEncoder`, but `XMLEncoder` currently requires `rootKey:` to be specified at encoding time, so it's not possible to provide an implementation of `encode(_:)` without some design around how to dynamically determine the root key to use. * Conditionally conform to Combine.TopLevelDecoder * Add test and documentation for Combine integration * Remove macCatalyst from CombineTests This shouldn't be necessary because all versions of Mac Catalyst should have a version of Combine available. * Add CombineTests to the Xcode project * Disable CombineTests on macOS
1 parent 4c713a9 commit 70c55ec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,16 @@ extension IntOrString: Codable {
268268
This is described in more details in PR [\#119](https://github.com/MaxDesiatov/XMLCoder/pull/119)
269269
by [@jsbean](https://github.com/jsbean) and [@bwetherfield](https://github.com/bwetherfield).
270270

271+
<<<<<<< HEAD
271272
### Integrating with [Combine](https://developer.apple.com/documentation/combine)
272273

273274
Starting with XMLCoder [version 0.9](https://github.com/MaxDesiatov/XMLCoder/releases/tag/0.9.0),
274275
when Apple's Combine framework is available, `XMLDecoder` conforms to the
276+
=======
277+
## Integrating with [Combine](https://developer.apple.com/documentation/combine)
278+
279+
When Apple's Combine framework is available, `XMLDecoder` conforms to the
280+
>>>>>>> Conditionally conform to Combine.TopLevelDecoder (#132)
275281
`TopLevelDecoder` protocol, which allows it to be used with the
276282
`decode(type:decoder:)` operator:
277283

0 commit comments

Comments
 (0)