Methods
Attributes
[W] | json_creatable |
Class Public methods
dump(obj, *args) Link
from_hash(object) Link
# File ruby/ext/json/lib/json/generic_object.rb, line 21 def from_hash(object) case when object.respond_to?(:to_hash) result = new object.to_hash.each do |key, value| result[key] = from_hash(value) end result when object.respond_to?(:to_ary) object.to_ary.map { |a| from_hash(a) } else object end end