Add method to_json