Fortis-Collection / fortis

A framework for creating a strongly typed model based on Sitecore templates and the Sitecore API

Home Page:http://fortis.ws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Original should be marked with [JsonIgnore] attribute

GuitarRich opened this issue · comments

Can't serialize an IItemWrapper or IFieldWrapper because the .Original property has a circular reference in it.

I'm not sure Fortis should take a Dependency on Json.Net for this. Can this be achieved by the end user by overriding the property?

It can on the IItemWrapper easily enough. Its a little harder for the IFieldWrapper tho. Although the updates in v4 make it possible you would still have to override all field wrappers that you wanted to serialize.

@jasonbert what's your opinion on this?

To me this doesn't seem like a good idea. Also what would you do when it came to deserialization? Don't you need to provide a concrete class for that?

Wont fix