xml-rpc-rs icon indicating copy to clipboard operation
xml-rpc-rs copied to clipboard

Serde integration?

Open jonas-schievink opened this issue 7 years ago • 4 comments

It should be possible, at least in some cases, to automatically (de-)serialize data from/to the XMLRPC format. This would be pretty cool to have. Investigate and prototype!

jonas-schievink avatar Jan 15 '18 01:01 jonas-schievink

Prior art found in... another xml-rpc crate? https://github.com/adnanademovic/xml-rpc-rs/tree/d258ec563ef9af93d2ae9cc497ea31ed52e8890c/src/xmlfmt

jonas-schievink avatar Feb 19 '18 23:02 jonas-schievink

Initial work on this is being done on the serde branch. It supports passing arbitrary types as arguments if they implement Serialize, but requires breaking changes to be nicely integrated.

jonas-schievink avatar Jun 14 '18 23:06 jonas-schievink

That could even be a separate crate on which this one would depend (e.g. serde-xmlrpc which would only handle the data transcoding), with this crate implementing the networkey bits?

https://github.com/RReverser/serde-xml-rs but it seems to be doing its own custom thing rather than implementing a "standard" XML serialisation dialect.

xmo-odoo avatar Jul 07 '18 15:07 xmo-odoo

Correct, this could be implemented outside this crate. I'm currently not seeing too many reasons to do that, though. The current way it's implemented in the serde branch means that it's an internal detail of this crate and doesn't need a large and well thought-out API.

jonas-schievink avatar Jul 07 '18 15:07 jonas-schievink