Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12751 closed bug (fixed)

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/

Change History (1)

comment:1 Changed 11 years ago by James Huston

Resolution: fixed
Status: newclosed

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

Changeset: ee9687d441d625a420dc65590bbd0b930f800b3f

Note: See TracTickets for help on using tickets.