Bug Tracker

Modify

Ticket #6560 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

Problem with getJSON

Reported by: gerardogup Owned by:
Priority: Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: getJSON, json Cc:
Blocking: Blocked by:

Description

I have an script working perfectly with verion 1.3.2. This script uses getJSON function. Nevertheless, when I upgrade to 1.4.1 or 1.4.2, it does not work. Callback function never fires and when i track the error using $.ajax function, there is a parser error. This error says that i have an invalid JSON. This is not true because using 1.3.2 works fine. JSON structure has the next format... { variable1 : 'value1', variable2 : 'value2', variable3 : 'value3' } Thank you for your support. Gerardo

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

That is not valid JSON, the variables and values need to be quoted with double quotes. See json.org for the syntax. If you need to parse invalid JSON, get the response as text and eval() it yourself.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.