From: naruse@... Date: 2017-10-21T10:33:45+00:00 Subject: [ruby-core:83445] [Ruby trunk Bug#12219][Closed] JSON.parse does not resolve to specific Class by 'json_class' attribute, when symbolize_names:true Issue #12219 has been updated by naruse (Yui NARUSE). Status changed from Open to Closed Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED JSON library's upstream is https://github.com/flori/json. Could you report it to there? ---------------------------------------- Bug #12219: JSON.parse does not resolve to specific Class by 'json_class' attribute, when symbolize_names:true https://bugs.ruby-lang.org/issues/12219#change-67416 * Author: kek.forums@gmail.com (Petr Novak) * Status: Closed * Priority: Normal * Assignee: naruse (Yui NARUSE) * Target version: * ruby -v: ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32] * Backport: 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED ---------------------------------------- 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) -- https://bugs.ruby-lang.org/ Unsubscribe: