MantisBT - VCMI
View Issue Details
0001678VCMIOtherpublic2014-02-01 12:532014-06-02 08:41
Tow 
Ivan 
normalmajorhave not tried
closedfixed 
 
0.94d 
0001678: JsonWriter incorrectly appends comma characters ,
If the JSON meta contains comments, the comma gets appended afetr them.
This leads to the storing files as following:

{
    "author" : "VCMI Team" //vcmi,
    "contact" : "http://forum.vcmi.eu/index.php" [^] //vcmi,
    "description" : "Essential files required for VCMI to run correctly" //vcmi,
    "filesystem" : {
        "DATA/" : [
            {
                "path" : "/Data" //vcmi,
                "type" : "dir" //vcmi
            } //vcmi
        ] //vcmi,
        "MAPS/" : [
            {
                "path" : "/Maps" //vcmi,
                "type" : "dir" //vcmi
            } //vcmi
        ] //vcmi,
        "SPRITES/" : [
            {
                "path" : "/Sprites" //vcmi,
                "type" : "dir" //vcmi
            } //vcmi
        ] //vcmi
    } //vcmi,
    "modType" : "Graphical" //vcmi,
    "name" : "VCMI essential files" //vcmi,
    "version" : "0.0" //vcmi
} //vcmi


This causes series of warnings when loading a savegame (since Json serialziation relies on writing and reading text form of data).
No tags attached.
Issue History
2014-02-01 12:53TowNew Issue
2014-02-01 12:53TowStatusnew => assigned
2014-02-01 12:53TowAssigned To => Ivan
2014-02-01 13:04IvanStatusassigned => confirmed
2014-02-01 13:26IvanNote Added: 0004359
2014-02-01 13:26IvanStatusconfirmed => resolved
2014-02-01 13:26IvanFixed in Version => 0.94d
2014-02-01 13:26IvanResolutionopen => fixed
2014-06-01 20:59KantorNote Added: 0004703
2014-06-02 08:41KantorStatusresolved => closed

Notes
(0004359)
Ivan   
2014-02-01 13:26   
Should be fixed now.

Writer prints that comment simply as debug helper so it can be removed in case of problems.

As for serialization - I think I'll replace current version with proper serialization or even with boost::variant when I'll get time (and definitely not before release)
(0004703)
Kantor   
2014-06-01 20:59   
This one may be closed.