method
encode
v6.1.3.1 -
Show latest stable
- Class:
ActiveSupport::JSON
encode(value, options = nil)public
Dumps objects in JSON (JavaScript Object Notation). See http://www.json.org for more info.
ActiveSupport::JSON.encode({ team: 'rails', players: '36' }) # => "{\"team\":\"rails\",\"players\":\"36\"}"