Properties do not display due to JSON JavaScriptSerializer error

Brass Contributor

I have a SharePoint online library that utilizes several lookup columns.  The other day we started receiving errors in the modern view when trying to view the properties.  The error we are getting is "Sorry, properties can not be displayed, having error: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.."

 

If I look at the library in classic view everything appears to be operating correctly, modern just seems to be the issue.  Any ideas on where I should be looking to find the source of the problem?

 

I looked at the developer tools in Chrome (F12) and noticed there were a few 400 errors getting returned for the /GetList(@listUrl)/RenderListDataAsStream......  Not sure if that has anything to do with the problem or if it is just a symptom of the cause.

3 Replies

@Brian Meeuwenberg I ran into this one today. Did You ever find a solution?

 

I also found this post on GitHub

 

Regards, Magnus

@MagnusGoksoyrOLDProfile 

 

This is what I received from support:

Spoiler
In modern UI in order to render the properties pane (that also allows to edit the properties) we need to get from the server all the options for any of the lookup fields that are used. In this particular library there are 20 lookups for above 6 list whose item count I have listed, so these many values it would fetch and return this output in JSON format. The average length multiplied by the amount of options meant that the server needed to return a huge “wall of text”. This amount of text passed the limit of the JSON serializer and that is causing the issue.

The maximum characters allowed in JSON output is 2097152, if it exceeds this limit it would result in the error, that users are encountering.

Also the recommended number of lookup columns are 12 in SharePoint online, that is also exceeded in this particular list.

Reference articles:

https://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.maxjso...

List View Lookup Threshold

12

Specifies the maximum number of join operations, such as those based on lookup, Person/Group, or workflow status columns.

If the query uses more than eight columns, the operation is blocked. However, it is possible to programmatically select which columns to use by using maximal view, which can be set through the object model.

https://support.office.com/en-us/article/manage-large-lists-and-libraries-in-sharepoint-b8588dae-938...


Suggested Fix:

The only suggested fix to this issue would be to have the owner of the list, reduce the number of lookup columns that this list is referencing to and understand that to get to properties all the values that are in lookup column in the lookup list are fetched hence to design the list in such a way that this limit is not hit.

I believe one of our lookup lists caused the number of characters returned to cause the issue.   We needed to reduce our lookup list, and the error went away.