Page 1 of 1

Saved Json in ES3 doesn't seem to be syntax compliant

Posted: Mon Jan 06, 2020 8:06 pm
by mccorkle
When creating the json file with autosave, it appears that my refs structure does not properly quote the name in the name:value pairs. This breaks the JSON format and breaks both VSCODE and SublimeText's ability to pretty print the json for human reading.

Is it at all possible to output the refs with quoted names?

This is invalid:

Code: Select all

{
   12345:98765,
   Property2:18
}
But this is valid:

Code: Select all

{
   "12345":98765,
   "Property2":18
}
This is a snippet of my save file (pretty printed by hand) so that you can see the refs I'm talking about.

Code: Select all

{
    "shipRoot":
        {
        "__type":"UnityEngine.GameObject[],UnityEngine.CoreModule","value":
        [
            {
                "_ES3Ref":7139374594349341773,
                "es3Prefab":
                {
                    "prefabId":5123138595229489953,
                    "refs":
                    {
                        5659528284191635638:6980815370295274166,
                        7443586916800429069:1796597521629526107,
                        7245216576893928281:5098079636870816619,
                        268247155888627816:6039938019315063772,
                        3074738532931414759:6701136652198143081,
                        2236899530827502350:2487516566675549666,
                        8684833064885832872:1092295484646647293,
                        788292588922150956:5449179325417739803,
                        5908832277033869628:247759129125231666,
                        8694791048113774104:5425498621930847600,
                        6941103550527250387:3839426542959444662,
                        6718472215387770545:652502071415880776,
                        4934183880880111620:5363062230526081915,
                        1234915617042218165:2405769206430608620,
                        8866945598516867209:7433963674219058081,
                        5245207126208506099:6864209172520458260,
                        1544578079220845789:1828357735119120221,
                        7163735922762441306:4456791729616220067,
                        5447334519712418837:134645213545079122,
                        314060925811742003:4329505597621571514,
                        1754576339616720526:6148614478530964178,
                        4586659282978916032:7521685074820502782,
                        852807715710263810:401103814714599762,
                        2137258620463053645:1909571061996036345,
                        7801899059574929726:1442000576134921704,
                        5304584530947741234:462202376626091588,
                        4112914402531994243:7492389899817439134,
                        5944077891326909712:6673863431495296451,
                        1397211733995919133:591989995958469793,
                        541888378730777511:7139374594349341773,
                        4342040204047950105:3308226983230160351,
                        7549620352315502821:4629220691198606896,
                        7058817925872212377:5078504150858469478,
                        2077592280432799368:6266496707570565037,
                        1521381760402275433:8655919588693759616,
                        5377744286027310763:7373429362732455327,
                        1043032568348699951:125620790800662738,
                        3742110051298238441:4743448872773138151,
                        6828091562699831131:1603280212603571290,
                        2057739958013993993:2193021898841203277,
                        3493781202908113904:4925363821503839701,
                        407017126215386429:5051409164696527168,
                        1324931468704635000:977367946473788774,
                        8757087798018361428:5649688245910474188,
                        4446368255471135086:5894927862873932596,
                        813248087315562805:458102207666114916,
                        2973278933851476940:4697719083552366704,
                        3369834240770493689:3615311011916773033
                    }
                },
                "transformID":8655919588693759616,
                "layer":0,
                "tag":"ShipPart",
                "name":"Root",
                "hideFlags":0,
                "active":true,
                

            }
        ],
        "components":
        [
            {
                "__type":"UnityEngine.Transform,UnityEngine.CoreModule","_ES3Ref":8655919588693759616,"goID":7139374594349341773,"parent":null,"localPosition":
                {
                    "x":0,"y":0,"z":0
                },

                "localRotation":
                {
                    "x":0,"y":0,"z":0,"w":1
                },

                "localScale":
                {
                    "x":1,"y":1,"z":1
                }
            },

            {
                "__type":"ES3Internal.ES3Prefab,Assembly-CSharp-firstpass"
            }
        ]
        
    }
}           




Re: Saved Json in ES3 doesn't seem to be syntax compliant

Posted: Tue Jan 07, 2020 8:05 am
by Joel
Hi there,

Coincidentally I'm working on changing Easy Save to use string reference IDs rather than numerical reference IDs at the moment (which will also be backwards compatible with the numerical IDs).

If you PM me your invoice number, I'll be happy to send it over when it's ready (should be the this week).

All the best,
Joel