class Maildir::Serializer::JSON

Serialize messages as JSON

Public Instance Methods

dump(data, path) click to toggle source

Dump data as JSON and writes it to path.

Calls superclass method Maildir::Serializer::Base#dump
# File lib/maildir/serializer/json.rb, line 18
def dump(data, path)
  super(data.to_json, path)
end
load(path) click to toggle source

Read data from path and parse it as JSON.

Calls superclass method Maildir::Serializer::Base#load
# File lib/maildir/serializer/json.rb, line 13
def load(path)
  ::JSON.load(super(path))
end