Blacksmoke16 / oq

A performant, and portable jq wrapper to facilitate the consumption and output of formats other than JSON; using jq filters to transform the data.
https://blacksmoke16.github.io/oq/
MIT License
190 stars 15 forks source link

Xml deserialization #37

Closed Blacksmoke16 closed 4 years ago

Blacksmoke16 commented 4 years ago

Add initial implementation of XML deserialization. I added tests for a good amount of cases, however I think it would be best to get something out there and fix stuff as it appears verus delaying this forever until I find every case.

~I'm sure I'll refactor this to be better at some point. Possibly would be able to use XML::Reader most of the time and only expand the node to determine if it has children, vs this implementation of using reader, expanding it, then using the expanded Node the rest of the time.~

See: https://github.com/Blacksmoke16/oq/pull/37#issuecomment-544326979

Resolves #31. ~will probably wait for a better implementation before working on #7.~ @nichtich I'd appreciate if you want to give this a try to see if you can find anything I missed.

Blacksmoke16 commented 4 years ago

To keep track of bugs I find while trying out this:

Blacksmoke16 commented 4 years ago

UPDATE:

I've refactored the deserialization logic in 652764d. It's now in a spot I'm much more comfortable with. Will give it a few days if anyone wants to look over it and see if I missed anything. Otherwise should be good to go?

\cc @nichtich @nowaker