Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
SyntaxError: Token inesperado < en JSON en la posición 8

Estimados, recibí un error cuando llamé a la función ajax.

 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)

Este es mi código de llamada ajax:

 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 answers
Answer question

0

En mi caso, el JSON devuelto era demasiado grande. Intente establecer MaxJsonLength en el valor máximo de int.

 var jsonResult = Json(obj, JsonRequestBehavior.AllowGet); jsonResult.MaxJsonLength = int.MaxValue; return jsonResult;
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!