Project

General

Profile

Actions

Bug #13430

closed

JSON.parse(nil.to_json) throws exception.

Bug #13430: JSON.parse(nil.to_json) throws exception.

Added by ruby-has-bugs (John McMack) over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin16]
[ruby-core:80669]

Description

Perhaps JSON.parse("null") should return nil instead of throwing an exception. That's just stupid.

Updated by shyouhei (Shyouhei Urabe) over 8 years ago Actions #1 [ruby-core:80675]

  • Status changed from Open to Rejected

I believe recent version (>= 2.0.0 maybe?) of that library does accept "null" and renders nil. Try upgrading your library.

Actions

Also available in: PDF Atom