Skip to content

Release v0.997 - Changed Nu's serialization format to be more human-editable.

Compare
Choose a tag to compare
@bryanedds bryanedds released this 06 Jan 03:26
· 12957 commits to master since this release

There has a been a long-standing issue with the way Nu serializes its simulants. Basically, there was special treatment needed for fields that belonged to xtensions. Worse, a nearly-full type name had to be included with the tag of each serialized field. Fortunately, this issue has finally been fixed, and now xtension fields are serialized to the same format used by normal, .NET fields!

Unfortunately, this does incur some breakage to your existing data. Namely, that you must change all nugroup file data from this -

    <Xtension>
      <Parallax type="System.Single">0.1</Parallax>
      <TileMapAsset type="Nu.AssetsModule+AssetTag">[Stage | BackgroundA]</TileMapAsset>
    </Xtension>
  • to this -

    <Parallax>0.1</Parallax>
    <TileMapAsset>[Stage | BackgroundA]</TileMapAsset>
    

And remove any lines like this -

    <Xtension />

That should be all you need to do!

The only other implication from this is that you can no longer add or remove fields dynamically to entities in the editor. On the bright side, this never proved to be a useful feature in the face of facets, so it's no loss from what I can tell.

Nonetheless, I am obligated to apologize for data breakage like this, as with XML, we have no static type system to shows us our breakage.

Here's the change list in detail -

Revamping serialization to make XML more human-editable. BREAKING CHANGE 651aaa9
Updated data to reflect new format. dccedc7
Made .NET fields read differently. ec752cc
Merge branch 'revamp_serialization' 6210c1b
Revived one Xtension test and killed another. fc0ab34