Skip to content

Instantly share code, notes, and snippets.

@Overbryd
Last active August 29, 2015 14:05
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Overbryd/a39f2644808104024345 to your computer and use it in GitHub Desktop.
Save Overbryd/a39f2644808104024345 to your computer and use it in GitHub Desktop.
JSON PStore support
require "pstore"
require "json"
class JSON::Store < PStore
def dump(table)
# use JSON.pretty_generate(table) to make it even more human readable
JSON.generate(table)
end
def load(content)
JSON.load(content)
end
end
@Overbryd
Copy link
Author

Overbryd commented Aug 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment