Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kostiantyn Chomakov 10 posts 78 karma points
    Jan 06, 2017 @ 14:36
    Kostiantyn Chomakov
    0

    Generic way to deserialize property.

    Hi, umbraco community.

    I am trying to find a way of proper deserialization of property from XML. Actually looking for an universal way to do opposite action to property.ToXml()

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Jan 06, 2017 @ 15:38
    Kevin Jump
    0

    Hi

    the quick way is to use the Packaging Service - it has export and import routines for most objects in umbraco.

    However it doesn't do mappings of ids and stuff (not yet anyway) so if for example you have a property that points to something else in umbraco it will likely contain the ID of the property, and that might be different when you import a property onto another umbraco install.

    uSync does do this mapping (disclaimer: i wrote it), and you can call the serialize / deseralize methods within it to get to and from xml, with the mappings.

Please Sign in or register to post replies

Write your reply to:

Draft