WowPacketParser icon indicating copy to clipboard operation
WowPacketParser copied to clipboard

Moving from a text-based to an XML-based output representation

Open ennioVisco opened this issue 7 years ago • 3 comments

Hi all,

since I wanted to work on the topic discussed on Trinitycore - Tool for Scripters/DB devs , I think that a first preparation step needed is to format the output in a more efficient and machine-readable way.

XML seems to be a good candidate since it is tree based (and therefore efficiently explorable) and can be compressed really well (ever heard about EXI)?

I'm doing some experiments on my fork, any ideas about this?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ennioVisco avatar Mar 03 '17 19:03 ennioVisco

I would agree with XML, if we were in 2005. I prefer JSON by a large margin.

However, we do not need to commit to a single output format, we can support both output writers, that use the same intermediate format.

binary PKT -> intermediate format -> output (text, xml, json, etc.)

I'm happy do discuss this so drop by the IRC some time :)

DDuarte avatar Mar 03 '17 22:03 DDuarte

Clearly my idea was not to bound the output to xml but to properly abstract it. Btw XML and JSON are not just two equivalent alternatives.... JSON is way better for data transfer but not that good for languages description, it is not just a metter of syntax :)

I'll be glad to discuss about it on IRC :)

ennioVisco avatar Mar 04 '17 12:03 ennioVisco

First part: moving handlers to proper structs/classes https://github.com/TrinityCore/WowPacketParser/tree/handlers_refactor

Second part: Serialization of structs to other formats https://github.com/TrinityCore/WowPacketParser/pull/296

DDuarte avatar Mar 12 '17 22:03 DDuarte