Copied to clipboard

Flag this post as spam?

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


  • Sean Håkansson 61 posts 177 karma points
    Dec 11, 2017 @ 14:40
    Sean HÃ¥kansson
    0

    Nested Content in member section (deserialize NC json string)

    I want to access a nested content property using:

    IMember.GetValue<IEnumerable<IPublishedContent>>("equipment")
    

    But keep getting null. I also tried to cast it as a IpublishedContent with no luck. When debugging I get the property value, but only as a object {string} (the raw json I guess).

    How can I parse Nested Content and deserialize it back to a enumerable? I've seen examples how to create NC programmaticly, but haven't seen how I can deserialize a json string to nested content.

  • Thomsen 108 posts 316 karma points
    Feb 16, 2018 @ 14:27
    Thomsen
    0

    I am having the same problem when trying to access nested content on members. Did you find a solution?

    Best regards.

  • Daniel Chenery 119 posts 464 karma points
    Feb 16, 2018 @ 23:38
    Daniel Chenery
    0

    I've had a similar problem with Nested Content in macros. I had to cast it to a JArray, and get the properties from there. Not sure if that would work for you here

    Not ideal, but it worked.

Please Sign in or register to post replies

Write your reply to:

Draft