I don't grok why this library exists or why octokit felt the need to use it, but it gets a very fundamental thing wrong. Sawyer::Resource.as_json returns nested Arrays rather than a nested Hash. This makes it really hard to work with out of the box.
Sawyer doesn't know anything about .as_json since that's an ActiveModel method. I suspect Sawyer::Resource#to_hash will get you closer to your desired results.
I don't grok why this library exists or why octokit felt the need to use it, but it gets a very fundamental thing wrong.
Sawyer::Resource.as_json
returns nested Arrays rather than a nested Hash. This makes it really hard to work with out of the box.