After today's stable update, when the JSON data contains fewer fields than the target class to read to it seems to just abort. it should ignore those fields and continue to match further class properties.
This currently renders my entire persistence framework and game modes built on top unusable. An urgent hotfix is required!
class EDF_DbEntityUtils { //------------------------------------------------------------------------------------------------ static bool StructAutoCopy(notnull Managed from, notnull Class to) { SCR_JsonSaveContext writer(); if (!writer.WriteValue("", from)) return false; string data = writer.ExportToString(); SCR_JsonLoadContext reader(); if (!reader.ImportFromString(data)) return false; return reader.ReadValue("", to); } }; class TypeA { int someProp; } class TypeB { int someOtherProp; // This causes the problem int someProp; } void Test() { TypeA a(); a.someProp = 1337; TypeB b(); Print(EDF_DbEntityUtils.StructAutoCopy(a, b)); }
The resulting print is 0/false and the b instance only has default values.