Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

195
Vistas
SyntaxError: Unexpected token < in JSON at position 8

Dears, I got error when i call the ajax function.

SyntaxError: Unexpected token < in JSON at position 8
    at JSON.parse (<anonymous>)
    at parseJSON (jquery?v=M6dmVkrHVhoZ1gfOtvVDZbgBcQTsbWxoLsRizcGkbPk1:1)
    at vo (jquery?v=M6dmVkrHVhoZ1gfOtvVDZbgBcQTsbWxoLsRizcGkbPk1:1)
    at k (jquery?v=M6dmVkrHVhoZ1gfOtvVDZbgBcQTsbWxoLsRizcGkbPk1:1)
    at XMLHttpRequest.u (jquery?v=M6dmVkrHVhoZ1gfOtvVDZbgBcQTsbWxoLsRizcGkbPk1:1)

This is my ajax call code:

   function MyFunction() {

    $.get("/Base/TestMethod", { message: 'nice' }, function (data) {

        console.log(data);

    }, 'json').fail(function (jqXhr, textStatus, errorThrown) {
        alert(textStatus + ": " + errorThrown + ": " + jqXhr.responseText);
        console.log(errorThrown);
    });
}
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

In my case, the returned JSON was too big. Try set MaxJsonLength to max int value.

var jsonResult = Json(obj, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda