google-api-ruby-client icon indicating copy to clipboard operation
google-api-ruby-client copied to clipboard

JSON.pretty_generate fails on model objects

Open saicheems opened this issue 9 years ago • 0 comments

I think this is because of the update to representable.

In the past the call JSON.pretty_generate(response) worked. Now I get the following stack trace:

/usr/local/lib/ruby/gems/2.4.0/gems/google-api-client-0.11.2/lib/google/apis/core/json_representation.rb:142:in `to_json': wrong number of arguments (given 1, expected 0) (ArgumentError)
	from /usr/local/lib/ruby/gems/2.4.0/gems/json-2.1.0/lib/json/common.rb:286:in `generate'
	from /usr/local/lib/ruby/gems/2.4.0/gems/json-2.1.0/lib/json/common.rb:286:in `pretty_generate'
	from dfareporting.accounts.get.frag.rb:22:in `<main>'

saicheems avatar May 10 '17 22:05 saicheems