Skip to main content

Bug Tracker

Side navigation

#12751 closed bug (fixed)

Opened October 16, 2012 09:11PM UTC

Closed October 17, 2012 08:29PM UTC

parseJson error throwing doesn't match JSON.parse behavior

Reported by: hustonjs Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: git
Keywords: Cc:
Blocked by: Blocking:
Description

Currently when you call parseJson on '', "", or {} you get null back. If you call JSON.parse on the same values it throws an error. After lots of conversation at the summit majority seemed to lean towards making the functionality of the 2 match.

http://jsfiddle.net/hustonjs/zHAcB/

Attachments (0)
Change History (1)

Changed October 17, 2012 08:29PM UTC by James Huston comment:1

resolution: → fixed
status: newclosed

Fix #12751. Ensure parseJson throws in the same situations as JSON.parse. Close gh-993.

Changeset: ee9687d441d625a420dc65590bbd0b930f800b3f