Adding to_json method on gist file
Adding to_json to gist