Sitecore Collection Json Serialization


I am trying to Json Serialize a Sitecore object that has a list of another item in it. The inner item contains LinkField and ImageField.

I am getting the following error:

Exception: Newtonsoft.Json.JsonSerializationException
Message: Error getting value from 'IsValidForLanguageFallback' on 'Sitecore.Data.Fields.Field'.
Source: Newtonsoft.Json

Nested Exception

Exception: System.InvalidOperationException
Message: Nullable object must have a value.
Source: mscorlib
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at Sitecore.Data.Fields.Field.get_IsValidForLanguageFallback()
at GetIsValidForLanguageFallback(Object )
at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)

Any thoughts?

1 Reply

  • HI

    IsValidForLanguageFallback processor process a method which call LanguageFallbackFieldValuesManager IsValidForFallback method, I hope the the item you are trying to serialize must have multiple version , please check the version of the field , another thing can be done mark as shared checkbox in template of the item .