Saltar al contenido
Underc0de /foro

[SOLUCIONADO] unexpected character at line 1 column 1 of the JSON data

Iniciado por graphixx, Junio 09, 2016, 09:27:40 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Avatar de graphixx
Junio 09, 2016, 09:27:40 PM Ultima modificación: Junio 09, 2016, 10:21:58 PM por Gabriela
[SOLUCIONADO] unexpected character at line 1 column 1 of the JSON data

Solucion al error JSON.parse

Firefox:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

[SOLUCIONADO] unexpected character at line 1 column 1 of the JSON data

Chrome:
Uncaught SyntaxError: Unexpected token < in JSON at position 0

[SOLUCIONADO] unexpected character at line 1 column 1 of the JSON data

El error en mi caso se debía a que en la tabla de la base de datos que estaba insertando el registro, el ID que era clave primaria no estaba a AUTO INCREMENT.

Puede ser causado también si indicas una clave como NOT NULL y no es el usuario el que la llena si no el script y la estas enviando vacía.

Undertip: http://blog.underc0de.org/tips-solucion-al-error-json-parse/
Mi Blog Personal
Los enlaces son solo para miembros. Registrate o iniciá sesión

Grupo de WhatsApp