Skip to content

Instantly share code, notes, and snippets.

@goofrider
Created September 22, 2020 21:09
Show Gist options
  • Save goofrider/c126bb333a37575f46ef9802944c9116 to your computer and use it in GitHub Desktop.
Save goofrider/c126bb333a37575f46ef9802944c9116 to your computer and use it in GitHub Desktop.
How to serializer Sawyer::Resource object to json?
# How to serializer Sawyer::Resource object to json?
# https://github.com/lostisland/sawyer/issues/34
require 'json'
sawyer_resource.map(&:to_h).to_json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment