method

to_json

v3.2.1 - Show latest stable - Class: Object
to_json(options = nil)
public

Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.

1Note

Missing documentation for options hash

pix ยท Sep 24, 2013

The deprecated function (http://apidock.com/rails/ActiveRecord/Serialization/to_json) has more useful documentation for the options hash.