Module: javajava::util::Collection

Defined in:
lib/jactive_support/json/encoders/collection.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object

:nodoc:



8
9
10
# File 'lib/jactive_support/json/encoders/collection.rb', line 8

def as_json(options = nil) #:nodoc:
  self
end

#to_json(options = nil) ⇒ Object

Returns a JSON string representing the Array. options are passed to each element.



4
5
6
# File 'lib/jactive_support/json/encoders/collection.rb', line 4

def to_json(options = nil) #:nodoc:
  "[#{map { |value| ActiveSupport::JSON.encode(value, options) } * ','}]"
end