Invalid JSON Response Error???

Invalid JSON Response Error???

rajaaarajaaa Posts: 21Questions: 10Answers: 2
edited June 2015 in Free community support

I have passed the JSON encode string from the server side but it causes an error datatables.net/tn/1 even though the json is valid.( I have checked the validity in the http://jsonlint.com/)

{
    "draw": 2,
    "recordsTotal": 1739,
    "recordsFiltered": 1739,
    "data": [
        [
            "22-Apr-15 03:37 pm",
            "Task",
            "127.0.0.1",
            "Admin (Blue) Changed Plan to Task On:</b> 22-04-2015 03:37:51 PM\n CURRENT-Task Title: admin to employeee NEW-Task Title: admin to employeeesdfsd, CURRENT-Description: admin to employeeeadmin to employeeeadmin to employeee, NEW-Description: admin to employeeeadmin to employeeeadfdmin to employeee, CURRENT-Priority: Medium, NEW-Task Priority: Low, CURRENT-Size: Small, NEW-Size: Big, CURRENT-Status: Last, NEW-Task Status: S, CURRENT-Background Color: Empty, NEW-Background Color: #b83939, CURRENT-Text Color: Empty, NEW-Text Color: #faf5f5, CURRENT-Assigned To: Raja(Admin), NEW-Assigned To: Raja(Admin), Vimala(Bharath), CURRENT-Completion Date: 16-04-2015, NEW-Completion Date: 18-04-2015"
        ],
        [
            "22-Apr-15 03:38 pm",
            "Task",
            "127.0.0.1",
            "Bharath (Task) Task Edited On:</b> 22-04-2015 03:38:41 PM\n OLD-Task Title:admin to employeee, NEW-Task Title:admin to employeeesdfsd, OLD-Description:admin to employeeeadmin to employeeeadmin to employeee NEW-Description:admin to employeeeadmin to employeeeadfdmin to employeee, OLD-Priority:Medium, NEW-:PriorityLow, OLD-Size:Small, NEW-Size:Big, OLD-Status:S, NEW-Status:S, OLD-Assigned To:Raja(Admin), NEW-Assigned To:Raja(Admin), Vimala(Bharath), OLD-Completion Date:16-Apr-2015, NEW-Completion Date:18-Apr-2015"
        ],
        [
            "22-Apr-15 03:41 pm",
            "Plan",
            "127.0.0.1",
            "Bharath (Task) Plan Assigned On:</b> 22-04-2015 03:41:25 PM\n Plan Title:sdfs, Assigned To: Manickam(Admin), Priority: Medium, Size: Small, Completion Date: 20-04-2015"
        ],
        [
            "22-Apr-15 03:41 pm",
            "Plan",
            "127.0.0.1",
            "Bharath (Task) Plan Assigned On:</b> 22-04-2015 03:41:57 PM\n Plan Title:erwe, Assigned To: Admin, Priority: High, Size: Medium, Completion Date: 24-04-2015"
        ],
        [
            "22-Apr-15 04:13 pm",
            "Plan",
            "127.0.0.1",
            "Admin (Blue) Plan Assigned On:</b> 22-04-2015 04:13:46 PM\n Plan Title:dfg, Assigned To: Admin, Priority: Medium, Size: Medium, Completion Date: 09-04-2015"
        ],
        [
            "22-Apr-15 04:22 pm",
            "Plan",
            "127.0.0.1",
            "Admin (Blue) Plan Completed On:</b> 22-04-2015 04:22:24 PM\n Plan Title:sdf"
        ],
        [
            "22-Apr-15 04:22 pm",
            "Plan",
            "127.0.0.1",
            "Admin (Blue) Plan Uncompleted On:</b> 22-04-2015 04:22:34 PM\n Plan Title:activity assigned"
        ],
        [
            "22-Apr-15 04:22 pm",
            "Plan",
            "127.0.0.1",
            "Admin (Blue) Plan Uncompleted On:</b> 22-04-2015 04:22:35 PM\n Plan Title:activity assigned"
        ],
        [
            "22-Apr-15 04:26 pm",
            "Task",
            "127.0.0.1",
            "Admin (Blue) Edition Awaiting Approval On:</b> 22-04-2015 04:26:36 PM\n Task Title: activity assigned, CURRENT-Description: sdfs, NEW-Description: sdfswerwe"
        ],
        [
            "22-Apr-15 04:26 pm",
            "Plan",
            "127.0.0.1",
            "Admin (Blue) Plan Edition Changes Undone On:</b> 22-04-2015 04:26:52 PM\n Plan Title:activity assigned, CURRENT-Description:sdfs NEW-Description:sdfswerwe"
        ]
    ]
}

Answers

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Answer ✓

    That is indeed valid JSON. Which means that the server is also returning something else which makes it invalid.

    Can you please either use the debugger to give us a debug trace or link to the page so we can offer some help.

    Allan

  • rajaaarajaaa Posts: 21Questions: 10Answers: 2

    http://debug.datatables.net/uvizis in the link second table (#admin_log_table) and thanks for ur help

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Answer ✓

    Thanks for the trace.

    Could you possibly take another one, immediately after the error has occurred please.

    Thanks,
    Allan

  • rajaaarajaaa Posts: 21Questions: 10Answers: 2
  • rajaaarajaaa Posts: 21Questions: 10Answers: 2
    Answer ✓

    Thanks Alan the problem has solved just the html comments in the JSON file causes an error

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Answer ✓

    Yup - that would do it :-)

This discussion has been closed.