Module: javajava::util::Collection
- Defined in:
- lib/jactive_support/json/encoders/collection.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#as_json(options = nil) ⇒ Object
:nodoc:.
-
#to_json(options = nil) ⇒ Object
Returns a JSON string representing the Array.
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( = 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( = nil) #:nodoc: "[#{map { |value| ActiveSupport::JSON.encode(value, ) } * ','}]" end |