Error during serialization or deserialization using the JSON JavaScriptSerializer

Frank Martin 411 Reputation points
2020-10-22T01:15:43.633+00:00

I am getting following error in SharePoint 2013 on premise when I try to access DispForm.aspx of a custom list.

Error during serialization or deserialization using the JSON JavaScriptSerializer

I found two solutions one of which talks about changing CSR Render Mode to Server Render in webpart settings but even that page is giving the same error.

Solution 2 is to change as below but I don't know which page it is talking about which contain <Form> tag? There is a form tag in Master Page but it is not the same as mentioned in solution below.

Add UseLegacyForm="TRUE" attribute in <Form>

https://www.keapoint.com/workaround-the-length-of-the-string-exceeds-the-value-set-on-the-maxjsonlength-property-in-sharepoint-2013-list-forms/

How do I fix this issue?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,180 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,564 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Jerryzy 10,561 Reputation points
    2020-10-22T09:04:14.61+00:00

    Hi @Frank Martin ,

    This is the list forms schema rather then form tag in Master Page:

    Forms element (List)

    And this solution is working for custom list form page, for OOTB display form, it's not suitable.

    For the error message "Error during serialization or deserialization using the JSON JavaScriptSerializer", I suggest you could check out if in the list, there is lookup field which lookup a list with large items, try to reduce the lookup list cout or you can try other field type like Choices instead of Lookup dropdown column to overcome this issue.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Frank Martin 411 Reputation points
    2020-10-22T10:57:46.32+00:00

    I created a new MyDispForm.aspx in SPD and set it as default. Now it is working but it is displaying all hyperlinks as text for e.g.

    <a href="somelink.aspx">click here</a>
    
    0 comments No comments

  3. Jerryzy 10,561 Reputation points
    2020-10-23T08:35:13.873+00:00

    @Frank Martin ,

    This seems the hyperlink code didn't recognize as html element.

    Did the newly created form or master page contain such hyperlink code ? I suggest you can check in SPD for furthur troubleshooting.

    0 comments No comments