Bootgrid - Unexpected token < in JSON at position 0

Bootgrid - Unexpected token < in JSON at position 0



I am having a bootgrid table which I populate using ajax, the problem is when I select multiple columns from db, after ten columns I receive an error. Does anyone know if boodgrid has a limitation or something. I specify that the data are ok, I tested all of them with less than eleven rows and it works perfectly, but if I select more than 10 columns from db I receive this:



Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse ()

at Function.m.parseJSON (VM217 jquery-1.11.3.js:5)

at Object.success (VM219 jquery.bootgrid.js:231)

at j (VM217 jquery-1.11.3.js:2)

at Object.fireWith [as resolveWith] (VM217 jquery-1.11.3.js:2)

at x (VM217 jquery-1.11.3.js:5)

at XMLHttpRequest.b (VM217 jquery-1.11.3.js:5)





Can you post the JSON you're receiving when are more than 10?
– Michael Montero
Aug 24 at 13:36





1 Answer
1



Your request doesnt return JSON, but (highly likely) HTML and the HTML starts with <!DOCTYPE or <html>, either starts with your unexpected <. It tries to parse the HTML as a JSON-string, can't, and errors.


<!DOCTYPE


<html>


<



If you open your browsers console, go to the tab where you can see the requests made, select the one with the error and see what you actually get returned. There will be an error there or other information to push you in the right direction.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ