Forum Discussion
Brian Meeuwenberg
Oct 23, 2018Brass Contributor
Properties do not display due to JSON JavaScriptSerializer error
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...
MagnusGoksoyrOLDProfile
Oct 17, 2019Bronze Contributor
Brian Meeuwenberg I ran into this one today. Did You ever find a solution?
I also found this post on GitHub
Regards, Magnus
Brian Meeuwenberg
Oct 17, 2019Brass Contributor
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.maxjsonlength(v=vs.110).aspx
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-9387-48c2-9248-c24122f07c59
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.
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.maxjsonlength(v=vs.110).aspx
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-9387-48c2-9248-c24122f07c59
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.
- MagnusGoksoyrOLDProfileOct 18, 2019Bronze Contributor
Thanks! Brian Meeuwenberg