Last Comment Bug 548462 - JSON replacer does not behave to specification - serializes key, not return value
: JSON replacer does not behave to specification - serializes key, not return v...
Status: RESOLVED DUPLICATE of bug 509184
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
: -- major with 4 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
http://skysanders.net/Tests/NativeJSO...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-24 16:52 PST by Sky Sanders
Modified: 2011-06-13 16:31 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Sky Sanders 2010-02-24 16:52:00 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6

When supplying a replacer the value returned is ignored and the member is serialized.

Reproducible: Always

Steps to Reproduce:
1. stringify an object with a date property
2. return an arbitrary string from replacer

Actual Results:  
json contains original member value

Expected Results:  
json should contain value returned from replacer
Comment 1 Sky Sanders 2010-02-24 16:54:20 PST
screen shots of tests on all browsers/platforms are here: 
http://www.browsercam.com/public.aspx?proj_id=508872

sorry, not segregated to FF.

If you see red, it is because the browser has native json and it failed.

So far only FF fails with native JSON.
Comment 2 Grunin Yuriy 2010-07-22 01:28:56 PDT
I can confirm this bug. There is no way to change the value of the property,
but it can be removed from resulting string by returning 'undefined'.
Same bug: https://bugzilla.mozilla.org/show_bug.cgi?id=543507
Comment 3 Sky Sanders 2010-08-21 07:36:16 PDT
What is the point of having a crippled buggy native JSON implementation?

No one thinks this is an issue?
Comment 4 Jan de Mooij [:jandem] 2010-08-21 10:52:51 PDT
Note that this will be fixed in FF4. 

FF 3.6:       7 tests of 8 passed, 1 failed.
FF 4 nightly: 8 tests of 8 passed, 0 failed.
Comment 5 Nickolay_Ponomarev 2010-09-03 11:19:48 PDT

*** This bug has been marked as a duplicate of bug 509184 ***

Note You need to log in before you can comment on or make changes to this bug.