Bug Tracker

Modify

Ticket #8687 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

improperly coded JSON string for empty array or object

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: 1.next
Component: ajax Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

When the data element of an ajax query includes either an empty object or empty array the buildParams function is improperly coding the value as nothing. Proper JSON coding for an empty array is '[]' and an empty object should be '{}'

I've checked the 1.5.1 source (line 6840) as well as 1.4.3 (line 5858.) Both exhibit this bug.

Change History

comment:1 Changed 2 years ago by rwaldron

  • Owner set to anonymous
  • Status changed from new to pending
  • Component changed from unfiled to ajax

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!

comment:2 Changed 2 years ago by dmethvin

  • Status changed from pending to closed
  • Resolution set to duplicate

comment:3 Changed 2 years ago by dmethvin

Duplicate of #6481.

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.