Closed fabio-costa-souza closed 3 years ago
You can do it by adding your traits. Actually they are poorly documented(but still mentioned on another site) but the framework is not hard to understand while not documented at all
Done: Use the macros:
Check Examples here: https://github.com/Loki-Astari/ThorsSerializer/blob/master/src/Serialize/test/OverrideIdentiferToKeyMapTest.cpp
Is it possible to have one field in the class, but different names for it during serialization/deserialization?
Something like this:
public class Videogame { private:
}
Videogame starcraft = new Videogame { Name = "Starcraft", ReleaseDate = new DateTime(1998, 1, 1) };
string json = ThorsAnvil::Serialize::jsonExport(starcraft);
Console.WriteLine(json); // { // "name": "Starcraft", // "release_date": "1998-01-01T00:00:00" // }