Pass options hash to `to_json` method.