nickbabcock / Pdoxcl2Sharp

A Paradox Interactive general file parser
MIT License
39 stars 12 forks source link

Deserializer #16

Open nickbabcock opened 10 years ago

nickbabcock commented 10 years ago

Any serious data serialization library (for instance JSON.NET, YamlDotNet, CsvHelper, etc) has the ability to deserialize data into custom classes, such that the user the library doesn't have to write their own parsing logic

For instance, given a class that has a string property, create an action that when parsing the stream and text comes up that matches the property's name, extract the following ReadString into the property.

Most of the other data types fall nicely into being parsed like this. The one exception are lists. There are two variations and I am unsure how to handle them

core=AAA
core=BBB
core=CCC

and

core={ AAA BBB CCC }
nickbabcock commented 10 years ago

I'm reopening this issue because while there is a "Decent deserializer" it is not complete, as it doesn't deserialize list like

a=1
a=2
a=3

And it doesn't support serializing either (though that might be worth breaking off into a separate issue)