Added Model to JSON converion

This allows one to call .to_json on a model to convert the values hash directly to a JSON string.