FluuxIO / XMPP

Pure Swift XMPP library
https://www.process-one.net/
Apache License 2.0
44 stars 6 forks source link

Codable XML Support #9

Open chrisballinger opened 4 years ago

chrisballinger commented 4 years ago

Howdy! Glad to see someone is working on a Swift NIO XMPP implementation.

Instead of writing your own XML parser and generator from scratch, it might be nice to leverage Codable with a helper library. There is already a Linux-compatible XML Codable library called XMLCoder that might be a great fit for this project, or possibly an inspiration for your own Codable support.

Cheers!

mremond commented 4 years ago

Thanks @chrisballinger I will have a look :)

mremond commented 4 years ago

Hi @chrisballinger

I am back working on this project. If I am not mistaken, Codable would be nice to be able to serialize the content. However, for parsing, in the context of an infinite stream, Codable is not easy to put in place and even a bit hackish, I think, for decoding.

Am I missing something ?

chrisballinger commented 4 years ago

Yeah that's a good point, you'd need to break the stream up manually and pass each full stanza to your Codable decoder.