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

150
Views
Javascript: token c inesperado en JSON en la posición 1 al convertir a json

Estoy tratando de convertir una cadena a json en javascript pero recibo el siguiente error. Sé que este es el formato estándar, pero de alguna manera no parece funcionar. ¿Puede alguien decirme qué estoy haciendo mal? :-

A continuación json:

 const txt = "{columns=[{visibleIndex=0, dataField=thumbnailUrl, name=thumbnailUrl, visible=true}, {visibleIndex=1, dataField=fileName, name=fileName, visible=true}, {visibleIndex=2, dataField=factorCategory, name=factorCategory, visible=true}, {visibleIndex=3, dataField=viewOnlyInd, name=viewOnlyInd, visible=true}, {visibleIndex=4, dataField=factorColonStatusCode, name=factorColonStatusCode, visible=true}, {visibleIndex=5, dataField=uploadedBy, name=uploadedBy, visible=true}, {visibleIndex=6, dataField=sourceCode, name=sourceCode, visible=true}, {visibleIndex=7, dataField=runnerFolderNames, name=runnerFolderNames, visible=true}, {visibleIndex=8, dataField=lastChgDate, name=lastChgDate, dataType=date, visible=true}, {visibleIndex=9, name=buttons, visible=true}], allowedPageSizes=[5, 10, 25, 50, 100, all], filterPanel={filterEnabled=true}, filterValue=null, searchText=, pageIndex=0, pageSize=0}" const obj = JSON.parse(txt);

ERROR :

 Unexpected token c in JSON at position 1
about 4 years ago · Juan Pablo Isaza
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!