developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 11 years ago

Closed 11 years ago

#909 closed enhancement (fixed)

jelix-www: bundled json.js is outdated and somewhat buggy

Reported by: Julien Owned by: Julien
Priority: normal Milestone: Jelix 1.1.3
Component: jelix-www Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

when using bundled json.js, I get a "too much recursion" alert and the browser (firefox3) hangs for a second.

This happens in unitests from testapp, so data to be encoded are not the origin of the problem.

Here's a patch that introduces json2.js, the new script (http://www.json.org/json2.js).

Benefits:

  • up to date
  • no bug (recursion)
  • standard name for methods: JSON.stringify() and JSON.parse() (so native browser methods will be used when implemented, ie Firefox 3.5)
  • the .js file is minified at build time

Attachments (1)

909-json2.js.diff (22.3 KB) - added by Julien 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by Julien

comment:1 Changed 11 years ago by Julien

  • Status changed from new to assigned

comment:2 Changed 11 years ago by laurentj

  • review changed from review? to review+

ok

comment:3 Changed 11 years ago by Julien

  • Resolution set to fixed
  • Status changed from assigned to closed

committed in the trunk and 1.1.x. r1395

Note: See TracTickets for help on using tickets.