Project

General

Profile

Actions

Bug #12219

closed

JSON.parse does not resolve to specific Class by 'json_class' attribute, when symbolize_names:true

Added by [email protected] (Petr Novak) about 9 years ago. Updated over 7 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]
[ruby-core:74586]

Description

When I enable symbolize_names, than parser does not match the 'json_class' attribute. The Hash instance is returned instead of expected instance of class defined in 'json_class' attribute.

JSON.parse(json, :create_additions => true, symbolize_names: true)

The attached Test demonstrates this issue.


Files

json_create_test.rb (975 Bytes) json_create_test.rb [email protected] (Petr Novak), 03/26/2016 12:00 PM
Actions

Also available in: Atom PDF

Like0
Like0