Add a #to_json and #from_json method Mostly for interacting with APIs that need the data represented in json format. This may belong in a controller object instead of a model, but so far I have found it more convenient in the model.