Last active
August 29, 2015 14:05
-
-
Save Overbryd/a39f2644808104024345 to your computer and use it in GitHub Desktop.
JSON PStore support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Slides to the talk: https://speakerdeck.com/overbryd/pstore-not-dead