json formatting errorr

json formatting errorr

Prashant08Prashant08 Posts: 2Questions: 1Answers: 0

DataTables warning (table id = 'dlrs'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.

Answers

  • farhadtablefarhadtable Posts: 47Questions: 27Answers: 1

    You must as follows information to contact the server side

    example: List<CaperData> tookCaperFromService = caperClien

    var result = new { data = tookCaperFromService.ToList() };
    string str = new JavaScriptSerializer().Serialize(result);
    return str;

    str is true format for you

  • allanallan Posts: 61,950Questions: 1Answers: 10,158 Site admin

    See the tech note that the error links to. If you are still having issues with it, please link to a test page showing the issue.

    Allan

  • Prashant08Prashant08 Posts: 2Questions: 1Answers: 0

    des is my code

  • allanallan Posts: 61,950Questions: 1Answers: 10,158 Site admin

    That wasn't what I asked for I'm afraid. If you read over the tech note again, you'd find that the key thing it so know what the server is returning that isn't valid JSON. The tech note tells you how to find that information. Please read the tech note.

    Allan

This discussion has been closed.