Invalid JSon error
Invalid JSon error
jalape
Posts: 117Questions: 2Answers: 1
Good afternoon everyone,
I have a problem filling a table from invalid json. In the forum I have found a link that describes the steps to detect the error: https://datatables.net/manual/tech-notes/1
The JSON Lint tool confirms that the Json format is not valid, the problem is that I don't know how to make it so.
I leave the link to the table: http://agenda.javierlasen.es/favorito
Thanks
This discussion has been closed.
Replies
The problem is at the end of the JSON response:
Looks like your server script is adding
NULL
to the response. Start by looking at what is returned from your your server script.Kevin
Thanks for answering Kevin:
This is the structure I am using:
The view has the table and calls the controller via ajax
In the controller I have the function to collect the model data
The model
Nothing obviously would be sending out a
NULL
there, but also the class is incomplete and it might well be in some of the supporting code. Perhaps search forecho
andprint
statements.Allan
I have modified the Model and now it works. Thank you very much for your time.