Method: JSONMapper::ClassMethods#parse_json_collection
- Defined in:
- lib/json_mapper.rb
#parse_json_collection(json) ⇒ Object
127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/json_mapper.rb', line 127 def parse_json_collection(json) collection = [] if json.is_a?(Array) json.each do |element| collection << parse_json(element) end end collection end |