• Not Answered

Object with Inner List Json Serialization



I am trying to serialize a sitecore model that contains a list of inner items to a json object.

I get 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)

I was wondering if anyone could help me with the issue.